Many times I need just to run a simple webserver in a specific directory. That is the solution I came up with.
Put the files somewhere and then:
$ npm install
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note": |
Clone
git clone <remote-url> <dir>
cd <dir>
git remote rm origin
Find a start commit of your history
START=git log | grep ...
/* "Invariance" in golang | |
* http://play.golang.org/p/ww9UEEKI97 | |
* | |
* Output: | |
* > B::foo | |
* > C::foo | |
* > B::foo | |
* > B::bar | |
* > B::bar | |
*/ |
package main | |
import ( | |
"fmt" | |
"github.com/crowdmob/goamz/aws" | |
"github.com/crowdmob/goamz/s3" | |
) | |
var ( |
Escape
.Ctrl-O
, Ctrl-W
, etc.): keep left Ctrl key behaviour as is.Cmnd-C
, Cmnd-V
, etc.): set left Alt key to behave as Ctrl_L
.Alt_L
button: set left Super key to behave as Alt_L
.The .Xmodmap
file:
! Set
remove Lock = Caps_Lock
keysym Caps_Lock = Escape
A way to run parrallels/boot2docker suggested by @YungSang suggests in Parallels/vagrant-parallels#115:
$ cd ~/dev/boot2docker
$ vagrant plugin install vagrant-parallels
$ vagrant init parallels/boot2docker
$ vagrant up --provider parallels
$ export DOCKER_HOST="tcp://`vagrant ssh-config | sed -n "s/[ ]*HostName[ ]*//gp"`:2375"
-- http://www.redisgreen.net/library/ratelimit.html | |
-- Return Value: 1 if rate limit exceeded, otherwise 0 | |
-- Keys: 1 | |
-- 1. A key to use as an expiring counter, e.g. "ratelimit:ip:127.0.0.1" | |
-- Args: 2 | |
-- 1. Maximum number of calls | |
-- 2. Amount of time in ms | |
local cnt = redis.call('INCR', KEYS[1]) |
// Source: https://redislabs.com/blog/5-methods-for-tracing-and-debugging-redis-lua-scripts#.VL2w7GRNoq4
redis.log(redis.LOG_WARNING, "foo bar")