Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block jbuchberger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
henrik / .bashrc
Created Dec 3, 2008
Git branch and dirty state in Bash prompt.
View .bashrc
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
nicoulaj /
Created Sep 20, 2012
What signals can your JRE handle ?
# Get temp dir
tmpdir=$(mktemp -d)
# Generate test
cat > ${tmpdir}/ <<EOF
import sun.misc.Signal;
import sun.misc.SignalHandler;
public class ListenToSignal {
nolim1t / gist:271018
Created Jan 7, 2010
Sample HTTP Request in Powershell
View gist:271018
Powershell HTTP Request
$r = [System.Net.WebRequest]::Create("http://url/")
$resp = $r.GetResponse()
$reqstream = $resp.GetResponseStream()
$sr = new-object System.IO.StreamReader $reqstream
$result = $sr.ReadToEnd()
write-host $result
Username and passwords
AdamBien / 35thAirhacksQ&
Last active Feb 8, 2017
View 35thAirhacksQ&
You can’t perform that action at this time.