Skip to content

Instantly share code, notes, and snippets.

@jammycakes
jammycakes / .bashrc
Created September 15, 2016 13:14
Bash command to open a program in a new window, detached from the console. Run dos <your command>
#! /bin/bash
function run_disowned() {
"$@" & disown
}
function dos() {
run_disowned "$@" 1>/dev/null 2>/dev/null
}
@jammycakes
jammycakes / namespace.js
Last active December 19, 2015 14:39
Provides the ability to define namespaces in JavaScript.
/* ====== namespace.js ====== */
// Provides the ability to define namespaces in JavaScript.
/**
* Declares a namespace in JavaScript.
*
* This function can be called in one of two ways:
*
* namespace(ns, obj)
@jammycakes
jammycakes / gitpredict.py
Created May 27, 2012 21:35
A script to attempt to predict how Git's popularity will increase over the next few years.
import math
import scipy.optimize
'''
This script attempts to predict how Git's popularity will increase
over the next few years by extrapolating the results of the annual
Eclipse Community Survey.
The forecast assumes that Git adoption is following an S-curve
(http://en.wikipedia.org/wiki/Sigmoid_function) up to an asymptotic