command | description |
---|---|
ctrl+a | Move cursor to the start of the line |
ctrl+e | Move cursor to the end of the line |
ctrl+b | Move cursor back one character |
ctrl+f | Move cursor forward one character |
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
{_} = require 'underscore' | |
child_process = require 'child_process' | |
async = require 'async' | |
healthCheckInterval = 60 * 1000 | |
bounceInterval = 60 * 1000 | |
bounceWait = bounceInterval + 30 * 1000 | |
delayTimeout = (ms, func) -> setTimeout func, ms | |
class MonitoredChild |
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.exports = { | |
default: { | |
// versionify will replace the following string with the actual version number | |
BUILD_VERSION: '__VERSION__' | |
}, | |
development: { | |
API_URL: 'http://localhost:3000' | |
}, | |
production: { | |
API_URL: 'http://acme.com' |
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
/* | |
* Date Format 1.2.3 | |
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> | |
* MIT license | |
* | |
* Includes enhancements by Scott Trenda <scott.trenda.net> | |
* and Kris Kowal <cixar.com/~kris.kowal/> | |
* | |
* Accepts a date, a mask, or a date and a mask. | |
* Returns a formatted version of the given date. |
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
// Simulating infinite-length leading lookbehind in JavaScript. Uses XRegExp. | |
// Captures within lookbehind are not included in match results. Lazy | |
// repetition in lookbehind may lead to unexpected results. | |
(function (XRegExp) { | |
function prepareLb(lb) { | |
// Allow mode modifier before lookbehind | |
var parts = /^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*)\)$/.exec(lb); | |
return { |
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 apt-get install libfontconfig | |
$ cd /usr/local/share | |
$ sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 | |
$ sudo tar xjf phantomjs-1.9.1-linux-x86_64.tar.bz2 | |
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs | |
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs | |
$ sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs |
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
#!/usr/bin/env python | |
# | |
# usage: | |
# conv2vmx-ovf.py some-vm.ovf | |
# | |
# ref: http://www.cnblogs.com/eshizhan/p/3332020.html | |
# | |
import sys | |
fn = sys.argv[1] |
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 add-apt-repository ppa:ubuntugis/ubuntugis-unstable # unstable packages | |
sudo apt-get install build-essential gdal-bin gdal-config libgdal-ecw-src | |
wget http://meuk.technokrat.nl/libecwj2-3.3-2006-09-06.zip | |
unzip ~/Downloads/libecwj2-3.3.2006-09-06.zip | |
cd ~/Downloadslibecwj2-3.3.2006-09-06 | |
./configure | |
make # wait | |
make install # or sudo make install | |
sudo gdal-ecw-build /usr/local | |
sudo ldconfig |
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
#!/usr/bin/env bash | |
optspec=":hv-:" | |
while getopts "$optspec" optchar; do | |
case "${optchar}" in | |
-) | |
case "${OPTARG}" in | |
loglevel) | |
val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) | |
echo "Parsing option: '--${OPTARG}', value: '${val}'" >&2 | |
;; |
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
#!/usr/bin/env bash | |
# Bash colors | |
RED="\033[0;31m" | |
GREEN="\033[0;32m" | |
ORANGE="\033[0;33m" | |
YELLOW="\033[1;33m" | |
NC="\033[0m" # No Color | |
ERROR="${RED}ERREUR:" | |
SUCCESS="${GREEN}OK:" |