Skip to content

Instantly share code, notes, and snippets.

@jasonboukheir
jasonboukheir / git
Last active September 15, 2024 15:27
git when in unix, git.exe when in wsl
#!/bin/sh
if pwd | grep /mnt/c > /dev/null; then
exec git.exe "$@"
else
exec /usr/bin/git "$@"
fi
@gsherman
gsherman / test.sql.ps1
Created May 15, 2012 14:10
a simple powershell script for calling an oracle stored procedure with both input and output parameters
$asm = [System.Reflection.Assembly]::LoadWithPartialName("System.Data.OracleClient")
$connectionString = "Data Source=myDatabase;uid=sa;pwd=sa";
$inputString = "foo";
$oracleConnection = new-object System.Data.OracleClient.OracleConnection($connectionString);
$cmd = new-object System.Data.OracleClient.OracleCommand;
$cmd.Connection = $oracleConnection;
$cmd.CommandText = "isFoo";
@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master