Category Archives: Snippets

Make Bamboo Shell Task Run Using Bash

Bamboo will call shell tasks on *nix agents using sh as opposed to Bash. For Debian agents, this means dash not bash. So, how do we redirect to bash? I found this snippet: [code language=”bash”] if [ “$(ps -p “$$” -o comm=)” != … Continue reading

Posted in Bamboo, Bash, Snippets | Leave a comment

Hack Classpath In Gradle

I recently tried this to fix the Classpath in Gradle for compiling and testing. Works for compiling, bombs for the testing though. The Gradle plugin integration using jna-3.2.7 blows up during unit testing when the older API is not loaded. … Continue reading

Posted in Gradle, Snippets | Leave a comment

Hex Encode/Decode String In C#

The same code is posted all over the news groups and Internet, but here it is, easy as a snippet for myself and for you to use. I don’t even get credit for this as what I have pretty much … Continue reading

Posted in C#, Snippets | Tagged | Leave a comment

Refresh Icon Cache In Windows 7

This keeps me from having to reboot: C:\Windows\system32\ie4uinit.exe -ClearIconCache

Posted in Snippets | Leave a comment

Jenkins Snippets

Wipe out workspaces for all projects: Thanks to Stefan Bäumler at, I made a copy right here. [code language=”groovy”] import hudson.model.* // For each project for(item in Hudson.instance.items) { // check that job is not building if(!item.isBuilding()) { println(“Wiping … Continue reading

Posted in Jenkins, Snippets | Leave a comment

Guid To Windows Clipboard Using Cygwin

Guid Generation This will give you a guid to your Windows clipboard using Cygwin. uuidgen | awk ‘{print “{” toupper($0) “}” }’ | putclip If you don’t like the newline that gets added, you can do this: uuidgen | awk … Continue reading

Posted in Bash, Cygwin, Snippets | Tagged , | Leave a comment

Oracle VirtualBox Snippets

Enumerate Guest Properties VBoxManage guestproperty enumerate Youre_VM_Name_Here Get IP (ipV4) Address Of Guest VBoxManage guestproperty get Youre_VM_Name_Here /VirtualBox/GuestInfo/Net/0/V4/IP Run Bash Command Inside Linux Guest VBoxManage –nologo guestcontrol Youre_VM_Name_Here execute –image “/sbin/ifconfig” –username guestUser –password guestUserPassword –wait-exit –wait-stdout — -a NOTE: … Continue reading

Posted in Snippets, VirtualBox | Tagged , | Leave a comment

Changed Owned Schema For User In SQL Server

I accidentally set “Owned Schemas” for a new user in SQL Server 2005 to db_backupoperator and db_owner. Not what I wanted, and then discovered I couldn’t change them back using SQL Management Studio. Oh, well, the following helped out. … Continue reading

Posted in Snippets, SQL Server | Tagged , | Leave a comment

Test JavaScript Function in Node.js Interactive Console

I needed to test an old JavaScript function on a new website. If you have Node installed, here is a great way to do it from the interactive console: eval(require(‘fs’).readFileSync(‘./path/to/file.js’, ‘utf8’)); I got this from: on

Posted in JavaScript, Snippets, Uncategorized | Tagged | Leave a comment

Cygwin Snippets and Resources

With Cygwin, sometimes you need all the help you can get. Here are some usefull snippets. Bash Find command for file, exclude Windows directories This searches or .png files among the Cygwin files. The -path ‘/BlahBlah’ -prune prevents the recursion … Continue reading

Posted in Cygwin, Snippets | Tagged | Leave a comment