View gist:9543536
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
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl |
View repset_mongo.sh
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
#!/bin/bash | |
# | |
# Starts up a MongoDB replica set | |
# | |
# There is a lot of documentation about replica sets: | |
# | |
# http://docs.mongodb.org/manual/reference/replica-configuration/ | |
# http://docs.mongodb.org/manual/administration/replica-sets/ | |
# | |
# To read data from a SECONDARY, when in the client, use: |
View gist:e3e022b9037c468d453e
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
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
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://collegetimes.co/lemp-server/ | |
https://www.littlebizzy.com/nginx-configuration | |
https://www.littlebizzy.com/nginx-server-block |
View gist:9db308384da53ec3d015
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
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
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 id = crypto.randomBytes(20).toString('hex'); | |
//=> bb5dc8842ca31d4603d6aa11448d1654 | |
var seed = crypto.randomBytes(20); | |
var id = crypto.createHash('sha1').update(seed).digest('hex'); | |
//=> 06eb06693508052c950cf6d915e6f70a8419baac | |
//=> http://stackoverflow.com/questions/9407892/how-to-generate-random-sha1-hash-to-use-as-id-in-node-js |
View lib.coffee
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
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
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
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
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
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. |
View tab-trigger.js
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
{ | |
"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": [ | |
{ |
OlderNewer