- Start Boot2Docker
- Add
HTTP_PROXY
andHTTPS_PROXY
variables in/var/lib/boot2docker/profile
- Restart docker daemon
sudo /etc/init.d/docker restart
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 | |
url=http://m2.neo4j.org/content/repositories/snapshots/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/neo4j-cypher-compiler-2.2-2.2-20140807.002630-9-sources.jar | |
fn=$(echo $url | sed -re 's/^.*\/([^/]*)$/\1/') | |
curl -s -o $fn -L $url | |
jar xf $fn org/neo4j/cypher/internal/compiler/ | |
echo Cypher Keywords | |
grep --no-filename -re 'keyword(' org/neo4j/cypher/internal/compiler/ \ | |
| sed 's/keyword(/\n\0/g' \ | |
| awk '/keyword\("/ { print tolower($0) }' \ |
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 | |
fn="$RANDOM" | |
while read -r line | |
do | |
echo $line >> /tmp/$fn | |
done | |
/e/software/emacs-24.3/bin/emacsclientw -n /tmp/$fn |
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
E:\software\emacs-24.2\bin\emacsclientw.exe -n -a e:\software\emacs-24.2\bin\runemacs.exe --server-file c:\Users\xshyamx\AppData\Roaming\.emacs.d\server\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
curl http://169.254.169.254/latest/meta-data/public-hostname |
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
git update-index --assume-unchanged [files] |
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
/* | |
* For http://chancejs.com/#todo - Better names | |
* Get national data from http://www.ssa.gov/oact/babynames/limits.html | |
* extract names.zip | |
* cat yob*.txt > all.csv | |
*/ | |
var fs = require('fs'); | |
var filename = 'all.csv', males = {}, females = {}; |
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
function colorMap(selectors) { | |
var a = [].map.call(document.querySelectorAll(selectors), function(v) { return v.innerHTML; }); | |
var cmap = {}; | |
a.reduce(function(p,c) { if ( c.indexOf('#') == 0 ) {cmap[p.toLowerCase()] = c;} return c; }); | |
return cmap; | |
} | |
var oldColors = colorMap('.cf div h1.f3,.cf div h2.f3'), | |
newColors = colorMap('.pvfl div h1,.pvfl div h2'), | |
colors = {}; |
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
import os | |
import json | |
import urllib2 | |
import hashlib | |
import argparse | |
import urlparse | |
import traceback | |
# configurable parameters |
Instead of the user scrolling through the entire list the most recently used items are promoted to the top, so the user can simply choose from his/her MRU list. We can attach a listener to the submit event of the form containing the combo box that requires the MRU functionality and store the values on each submit. When the form/page is reloaded the data stored in the HTML5 storage can be read back to construct an MRU list of items that can be appended to the top of the combo box.