Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
var https = require('https'); | |
var fs = require('fs'); | |
var options = { | |
key: fs.readFileSync('./nodejs.pem'), | |
cert: fs.readFileSync('./nodejs.crt') | |
}; | |
https.createServer(options, function (req, res) { | |
res.writeHead(200); |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
http://www.html5rocks.com/en/tutorials/file/dndfiles/ |
/** | |
* Workaround to make defining and retrieving angular modules easier and more intuitive. | |
*/ | |
(function(angular) { | |
var origMethod = angular.module; | |
var alreadyRegistered = {}; | |
/** |
#!/usr/bin/env python | |
# | |
# 1. Save this file as `pre-commit` in your local .git/hooks/ directory | |
# 2. Make sure your file is executable `chmod +x pre-commit` | |
# Upon git commit, this script will check your staged files against your eslint ruleset | |
# More flags and options at http://eslint.org/ | |
import os, sys | |
""" |
ssh-keygen -t rsa -C "xxx@me.com" | |
cat /home/deploy/.ssh/id_rsa_xxx.pub, copy to github | |
edit ~/.ssh/config | |
``` | |
# XXX | |
Host github-xxx | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa_xxx | |
``` |
A small library for padding strings in JavaScript. Marmalade-free.
![NPM version][shield-npm] ![Node.js version support][shield-node] ![Build status][shield-build] ![Code coverage][shield-coverage]
var istanbul = require('browserify-istanbul'); | |
module.exports = function (config) { | |
config.set({ | |
basePath: '../', | |
files: ['src/scripts/**/*.js', 'test/unit/**/*.js'], | |
frameworks: ['browserify', 'mocha', 'chai'], | |
browsers: ['PhantomJS'], // 'Chrome' |
Solution: | |
1. cd ~/.oh-my-zsh/ | |
2. sudo git status | |
3. you will see "Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'" | |
4. click space key till "agree" enter |