Posts

powershell: sending e-mail with attachments (using a pipe)

$PSEmailServer = "mailsrv" Get-ChildItem ("c:\temp") |       ForEach {$_.fullname} |       Send-MailMessage -to "x@regele.org" -from "y@regele.org" -subject "hi" -encoding ([System.Text.Encoding]::UTF8) $PSEMailServer needs to contain the smtp Server ForEach ... $_.fullname is required if files are not in current path

windows powershell: execute select against an oracle instance. (System.Data.OracleClient)

in no way a powershell guy, but powershell script: [Reflection.Assembly]::LoadWithPartialName("System.Data.OracleClient") > null  $connection=New-Object DATA.OracleClient.OracleConnection(     " Data Source=eoxi;User Id=eoxrep;Password=*** "     )      $connection.Open()  $reader = (new-Object DATA.OracleClient.OracleCommand(     " select * from eox.eox_log_ereignis_a where rownum < 10 ",     $connection)).ExecuteReader()  while( $Reader.Read()) {     $id   = $reader["log_id"]     $time = $reader["log_log_area"]     write-output "$id $time"  }  $connection.Close() executes as: oracle select GAC    Version        Location ---    -------        -------- True   v2.0.50727     C:\Windows\assembly\GAC_32\System.Data.OracleClient 174063524 ww Data Import: ISIN ...

change git tracked files to executable on windows machines (here: gradle wrapper runner)

git update-index --chmod=+x gradlew in my case: the ci server runs a linux environent, my currently used dev machine is windows

generate static swagger documentation or client stubs with codgen and gradle (with JavaExec)

Swagger ist a possible language independent solution to describe your REST based services. I use it currently together with spring-boot to provide my mobile json api. To generate docs and client stubs with gradle I resort to: task genSwagger (type: JavaExec ) {     description "generate swagger doc or clients via codgen package and gradle"     // needing buildscript dependency  classpath "com.wordnik:swagger-codegen:2.1.2-M1"     classpath = buildscript.configurations.classpath     args   = ["-i", "http://localhost:8080/........-rest-api", "-o", "${buildDir}/docs/rest-api", "-l", "android"]     main      = "com.wordnik.swagger.codegen.Codegen" } run with "gradlew genSwagger" As of today to my knowledge no stable gradle plugin exists for codegen (maven only), so starting it's Main class from gradle is my solution for now. see also: http://swagger.io/ https://github.com/sp...

updated current tool list (windows)

thunderbird open office calibre firefox+firebug chrome+any.do tor picasa raw therapee gimp lightworks vlc dvd flick avidemux Audacity MuseScore streamWriter foobar2000 itunes mp3tag Exact Audio Copy STS Android Studio Arduino Source Tree git gradle Cyberduck WinSCP Areca Backup ownCloud FreeFileSync dropbox notepad++ Process Hacker 2 ConEmu Explorer++ TrueCrypt KeePass cdburnerXP greenshot

logging ... tools to remember

send windows logs  http://nxlog.org/ accumulate and search logs http://loggly.com  logback syslog appender logback loggly appender kiwi syslog server / winsyslog 2015-02-19 20:17:11 INFO input file C:\**\nxlog\data\nxlog.log was truncated, restarting from beginning 2015-02-19 20:17:11 INFO nxlog-ce-2.8.1248 started 2015-02-19 20:17:11 INFO connecting to logs-01.loggly.com:514

openShift (free plan) für erste Gehversuche - aber eher nicht mit gradle.

Ok, nach Spielereien mit openShift für eine Demoanwendung: the good: toller Plan mit 3 freien (kleinen) Maschienchen "Applications/gears" jenkins Server und jenkins build von Cloud Anwendungen schon integriert neuer Stack (as of today: java 8) recht viel Dokumentation the ugly (für mich):  meine (nicht mal große) Anwendung kann nicht über den "coolen" weg git push und build scripte deployed werden. Konkret: gradle wird nicht native unterstützt, und wenn ich das in der virtuellen Maschine mit gradlew Script ausführe wird sofort die Disk Quota überschritten. :processResources :classes :war :bootRepackage :assemble :deployOpenShift FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':deployOpenShift'. > Could not copy file '/var/lib/openshift/547cecd0*********060/app-root/runtime/repo/build/libs/totask2.war' to '/var/lib/openshift/547c*********0/app-root/runtime/repo/deployments/to*****...