git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
<?xml version="1.0" encoding="utf-8"?><root version="6000"><sect_php><name_0>Whitespace</name_0><color_0>clNone</color_0><fontcolor_0>clTeal</fontcolor_0><isbold_0>0</isbold_0><isunderline_0>0</isunderline_0><isitalic_0>0</isitalic_0><isstikeout_0>0</isstikeout_0><name_1>String</name_1><color_1>clNone</color_1><fontcolor_1>$003CCE94</fontcolor_1><isbold_1>0</isbold_1><isunderline_1>0</isunderline_1><isitalic_1>0</isitalic_1><isstikeout_1>0</isstikeout_1><name_2>Comment</name_2><color_2>clNone</color_2><fontcolor_2>$00AEAEAE</fontcolor_2><isbold_2>0</isbold_2><isunderline_2>0</isunderline_2><isitalic_2>1</isitalic_2><isstikeout_2>0</isstikeout_2><name_3>Text</name_3><color_3>clNone</color_3><fontcolor_3>clNone</fontcolor_3><isbold_3>0</isbold_3><isunderline_3>0</isunderline_3><isitalic_3>0</isitalic_3><isstikeout_3>0</isstikeout_3><name_4>Reserved words</name_4><color_4>clNone</color_4><fontcolor_4>$004848E1</fontcolor_4><isbold_4>1</isbold_4><isunderline_4>0</isunderline_4><isitalic_4>0</isitalic_4><isstikeou |
# (Re)create the index | |
curl -X DELETE "http://localhost:9200/highlight" | |
curl -X PUT "http://localhost:9200/highlight" | |
# Insert the data | |
curl -X POST "http://localhost:9200/highlight/document" -d '{ "body" : "The quick brown fox jumps over the lazy dog" }' | |
curl -X POST "http://localhost:9200/highlight/document" -d '{ "body" : "Lazy dog jumps over the quick brown fox" }' | |
curl -X POST "http://localhost:9200/highlight/document" -d '{ "body" : "A Fox one day fell into a deep well and could find no means of escape. A Goat, overcome with thirst, came to the same well, and seeing the Fox, inquired if the water was good. Concealing his sad plight under a merry guise, the Fox indulged in a lavish praise of the water, saying it was excellent beyond measure, and encouraging him to descend. The Goat, mindful only of his thirst, thoughtlessly jumped down, but just as he drank, the Fox informed him of the difficulty they were both in and suggested a scheme for their common escape. \"If,\" said he, \"you will place your |
git init | |
mkdir vendor | |
git submodule add git://github.com/kriswallsmith/assetic.git vendor/assetic | |
mkdir vendor\bundles\JMS | |
git submodule add https://github.com/schmittjoh/SecurityExtraBundle.git vendor/bundles/JMS/SecurityExtraBundle | |
mkdir vendor\bundles\Sensio\Bundle |
# ======================================== | |
# Testing n-gram analysis in ElasticSearch | |
# ======================================== | |
curl -X DELETE localhost:9200/ngram_test | |
curl -X PUT localhost:9200/ngram_test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
curl "http://localhost:9200/insider/_search?pretty=true" -d ' | |
{ | |
"size" : 0, | |
"facets" : { | |
"tag" : { | |
"terms" : { | |
"field" : "url", | |
"script" : "term.replace(/(^http:\/\/[^\/]+).*/, \"$1\")" | |
} | |
} |
import random | |
import sys | |
while True: | |
print random.random() | |
sys.stdout.flush() |
<?php | |
class ColorCLI { | |
static $foreground_colors = array( | |
'bold' => '1', 'dim' => '2', | |
'black' => '0;30', 'dark_gray' => '1;30', | |
'blue' => '0;34', 'light_blue' => '1;34', | |
'green' => '0;32', 'light_green' => '1;32', | |
'cyan' => '0;36', 'light_cyan' => '1;36', |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh