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
| 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 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
| .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 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
| # 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 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
| # 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)" |
OlderNewer