Skip to content

Instantly share code, notes, and snippets.


crapthings crapthings

View GitHub Profile
View gist:9543536
ln -s /Applications/Sublime\ /usr/local/bin/subl
# Starts up a MongoDB replica set
# There is a lot of documentation about replica sets:
# To read data from a SECONDARY, when in the client, use:
View gist:e3e022b9037c468d453e
To have launchd start mongodb at login:
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
mongod --config /usr/local/etc/mongod.conf
View gist:f49ab3b838b41555a8c8
View gist:9db308384da53ec3d015
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/redis/3.0.3: 9 files, 892K
View gist:7597562
var id = crypto.randomBytes(20).toString('hex');
//=> bb5dc8842ca31d4603d6aa11448d1654
var seed = crypto.randomBytes(20);
var id = crypto.createHash('sha1').update(seed).digest('hex');
//=> 06eb06693508052c950cf6d915e6f70a8419baac
exports = @
@App = {}
App.login = App.signin = Meteor.loginWithPassword
App.logout = App.signout = Meteor.logout
App.isLoggedIn = -> return true if Meteor.user()
class App.Collection
View brew install rethinkdb
To have launchd start rethinkdb at login:
ln -sfv /usr/local/opt/rethinkdb/*.plist ~/Library/LaunchAgents
Then to load rethinkdb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rethinkdb.plist
==> Summary
🍺 /usr/local/Cellar/rethinkdb/2.2.2: 6 files, 37.3M
View gist:02ba622b9971bedc4ea0
WARNING: checksums are currently disabled for node.js v4.0 and later
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local/Cellar/nvm/0.30.1/versions/node/v5.4.0"
Run `npm config delete prefix` or `nvm use --delete-prefix v5.4.0` to unset it.
crapthings / tab-trigger.js
Created Jan 21, 2016 — forked from wesbos/tab-trigger.js
How to properly get a TAB trigger working with Emmet inside of JSX
View tab-trigger.js
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [