Skip to content

Instantly share code, notes, and snippets.

View thushan's full-sized avatar

Thushan Fernando thushan

View GitHub Profile
public class Bootstrap
{
public IDisposable Initialise()
{
var jitc = new NitroGcCompiler(Options.AggresiveGc);
var runtime = new ServerRuntime(jitc, Gc.VaryByLoad | Gc.NoTrace);
// Configure Runtime & JitC
return new Disposable(() =>
{
runtime.Dispose();
@thushan
thushan / git-branches-by-commit-date.sh
Last active August 29, 2015 13:56 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date & user for each branch. Sorted by most recent commit date.
# Credit http://stackoverflow.com/a/2514279 && https://gist.github.com/jasonrudolph/1810768
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci\t%cr\t%an" $branch | head -n 1` \\t$branch; done | sort -r
# See https://www.kernel.org/pub/software/scm/git/docs/git-show.html for other data
@thushan
thushan / gist:6289416
Created August 21, 2013 01:32
Detect Internet Explorer and version.
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// isIE === undefined
// If you're in IE (>=5) then you can determine which version:
// isIE === 7; // IE7
// Thus, to detect IE:
// if (isIE) {}
// And to detect the version:
// isIE === 6 // IE6
// isIE > 7 // IE8, IE9, IE10 ...
@thushan
thushan / gist:6265616
Created August 19, 2013 03:48
Install Package Control for Sublime Text 3 behind a proxy powered by CNtlm on localhost on port 3128.
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler({"http": "http://127.0.0.1:3128"})) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())