This file contains 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
# stick these in ~/.gitconfig | |
[alias] | |
bl = "!~/.bin/bl.sh" | |
# ensure you are on latest master before creating a PR | |
prep = "!git checkout master && git pull --rebase && git checkout - && git rebase master" | |
# commit, get the commit message, and then immediately start writing up the PR. | |
cmpr = "!git add . && git commit -a $1 && git push && open https://github.com/opendoor-labs/$(basename `pwd`)/compare/master...$(git rev-parse --abbrev-ref HEAD)" |
This file contains 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
# https://github.com/gterrono/houston/blob/4ec16866346abc1b08e761d62441a56fd93a7e99/server/list_view.coffee | |
Dummy = new Meteor.Collection("system.dummy") # hack. | |
collections = {} | |
Meteor.startup( -> | |
console.log collections | |
Dummy.findOne() # hack | |
Meteor._RemoteCollectionDriver.mongo.db.collections (meh, collections) -> | |
collection_names = (col.collectionName for col in collections \ | |
when (col.collectionName.indexOf "system.") isnt 0) |
This file contains 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
.logo { | |
filter: grayscale(100%); | |
-webkit-filter: grayscale(100%); | |
opacity: 0.6; | |
transition-property: opacity,transform; | |
-webkit-trdansition-property: opacity,-webkit-transform; | |
transition-duration: .3s; | |
-webkit-transition-duration: .3s; | |
} |
This file contains 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
module Enumerable | |
def bag | |
# [1,1,1,1,2,2,3] => {1 => 4, 2 => 2, 3 => 1} | |
# similar to python's Counter | |
Hash[group_by { |x| x }.map {|k, v| [k, v.count] }] | |
end | |
end | |
def print(grid) | |
system('clear') |
This file contains 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
Talk Links | |
Houston: http://github.com/gterrono/houston | |
Atmosphere: atmosphere.meteor.com/package/houston | |
Merging with Ogno-Admin! | |
Demo: http://houstondemo.meteor.com | |
Adding Custom Menu Code: http://imgur.com/qfJC3WF |
This file contains 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
var count = parseInt(localStorage.getItem('count')) || 0; | |
simply.on('singleClick', function(e) { | |
if (e.button === 'up') { | |
count+=1; simply.subtitle(count); | |
} else if (e.button === 'down') { | |
count-=1; simply.subtitle(count); } | |
localStorage.setItem('count', count); | |
}); |
This file contains 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
simply.title('Hello PennApps!'); |
This file contains 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
def d(*args): | |
d_name = 'd' | |
import inspect | |
cur = inspect.currentframe() | |
calling_frame = inspect.getouterframes(cur)[1] | |
frameinfo = inspect.getframeinfo(calling_frame[0]) | |
string = frameinfo.code_context[0].strip() | |
import ast | |
ast_module = ast.parse(string) |
This file contains 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
import string | |
from random import shuffle | |
alphabet = list(string.lowercase + string.digits) | |
shuffle(alphabet) | |
print "".join(alphabet) |
This file contains 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
#!/usr/bin/env python | |
from __future__ import with_statement | |
import os | |
import shutil | |
import subprocess | |
import sys | |
import tempfile | |
def system(*args, **kwargs): |
NewerOlder