| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| var http = require('http'); | |
| //reuse express server | |
| var server = app.listen(3333); | |
| //create server | |
| //var server = http.createServer(app); | |
| function request(server){ |
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
| my_needed_commands="sed awk lsof who" | |
| missing_counter=0 | |
| for needed_command in $my_needed_commands; do | |
| if ! hash "$needed_command" >/dev/null 2>&1; then | |
| printf "Command not found in PATH: %s\n" "$needed_command" >&2 | |
| ((missing_counter++)) | |
| fi | |
| done |
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
| sudo /Library/StartupItems/MySQLCOM/MySQLCOM start |
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
| var AssetGraph = require('assetgraph'); | |
| var nib = require("nib"); | |
| module.exports.task = function (packageName ){ | |
| new AssetGraph({root: __dirname + "/src/" + packageName+ "/"}) | |
| .loadAssets("templates/*/**.css") | |
| .loadAssets('templates/**.html') | |
| .loadAssets('templates/*/**.styl') | |
| .loadAssets('templates/*/**.less') |
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
| curl -O https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb | |
| mv php.rb `brew --prefix`/Library/Formula | |
| #To see the available options: | |
| brew options php | |
| brew install php --with-mysql --with-fpm |
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
| This has worked for me in the past: | |
| function convertDataURIToBlob(dataURI, mimetype) { | |
| var BASE64_MARKER = ';base64,'; | |
| var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
| var base64 = dataURI.substring(base64Index); | |
| var raw = window.atob(base64); | |
| var rawLength = raw.length; | |
| var uInt8Array = new Uint8Array(rawLength); | |
| for (var i = 0; i < rawLength; ++i) { |
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
| sudo vi /etc/ssh/sshd_config | |
| And change the following values: | |
| Port 2207 | |
| ... | |
| PermitRootLogin no | |
| ... | |
| AllowUsers myuser git | |
| ... | |
| PasswordAuthentication no |
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
| apt-get update | |
| apt-get upgrade --show-upgraded | |
| apt-get install libpcre3-dev build-essential libssl-dev | |
| cd /opt/ | |
| wget http://nginx.org/download/nginx-1.0.4.tar.gz | |
| tar -zxvf nginx-1.0.4.tar.gz | |
| cd /opt/nginx-1.0.4/ | |
| ./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-ipv6 |
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
| #!/bin/sh | |
| # | |
| # <daemonname> <summary> | |
| # | |
| # chkconfig: <default runlevel(s)> <start> <stop> | |
| # description: <description, split multiple lines with \ | |
| # a backslash> | |
| ### BEGIN INIT INFO | |
| # Provides: |