This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
map = log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%x20%s%x20' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function git_num_untracked_files { | |
expr `git status --porcelain 2>/dev/null| grep "^??" | wc -l` | |
} | |
function git_num_staged_new_files { | |
expr `git status --porcelain 2>/dev/null| grep "^A" | wc -l` | |
} | |
function git_num_staged_modified_files { | |
expr `git status --porcelain 2>/dev/null| grep "^M" | wc -l` | |
} | |
function git_num_unstaged_files { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = [1,2,3,1,1,2,1,1] | |
class jump_path(): | |
def __init__(self, target_array = None, spots = []): | |
#print('new path!') | |
self.target = target_array | |
self.spots = spots | |
def hops(self): | |
return len(self.spots)-1 | |
def next_hops(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ezimmerman@qdidev:~$ cat test.py | |
class FooBar(object): | |
derp = 0 | |
baz = 0 | |
def __init__(self): | |
FooBar.derp += 1 | |
self.derp += 1 | |
self.baz += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<!-- begin libraries --> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create zz namespace | |
var zz = zz = zz || {}; | |
// create zz.util namespace | |
zz.util = zz.util = zz.util || {}; | |
// create zz.util.keyboard prototype | |
zz.util.keyboard = cc.Class.extend( /** @lends zz.util.keyboard# */ { | |
_keys: {}, | |
/** | |
* Constructor | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stackTrace() { | |
var err = new Error(); | |
return err.stack; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE> | |
<html> | |
<head> | |
<style> | |
input { | |
width:60px; | |
transition-duration:0.5s; | |
} | |
input:focus { | |
width:200px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add a random song to your Grooveshark playlist | |
Clears queue (not very fast) then adds the first song using a random songID that is valid | |
*/ | |
(function() { | |
//clear current queue | |
function removeSong(cb) { | |
w = window.Grooveshark.setSongStatusCallback(); | |
if (w && w.status != "none") { |
NewerOlder