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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
mkdir download /tmp/installdir; cd download; | |
curl -LO http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz | |
tar xf Python-2.7.6.tgz | |
cd Python-2.7.6 | |
yum -y install openssl-devel.x86_64 readline-devel.x86_64 bzip2-devel.x86_64 sqlite-devel.x86_64 zlib-devel.x86_64 ncurses-devel.x86_64 db4-devel.x86_64 expat-devel.x86_64 rpm-build.x86_64 | |
env CC=gcc44 CXX=g++44./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6 | |
make -j2 | |
make install DESTDIR=/tmp/installdir | |
echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh | |
fpm -s dir -t rpm -n python27 -v 2.7.6 -C /tmp/installdir \ |
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/bash | |
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) | |
if [ -z "$GIT_DIR" ]; then | |
echo >&2 "fatal: hooks/functions: GIT_DIR not set" | |
exit 1 | |
fi | |
read oldrev newrev refname |
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
{ | |
"template": "logstash-*", | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
"index" : { | |
"query" : { "default_field" : "@message" }, | |
"store" : { "compress" : { "stored" : true, "tv": true } } | |
} | |
}, |
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
input { | |
redis { | |
data_type => "list" | |
host => "10.0.0.1" | |
key => "q1" | |
port => 6379 | |
type => "redis2_q1" | |
threads => 1 | |
batch_events => 100 | |
} |
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
# TO_FOLDER=/something | |
# FROM=/your-es-installation | |
DATE=`date +%Y-%m-%d_%H-%M` | |
TO=$TO_FOLDER/$DATE/ | |
echo "rsync from $FROM to $TO" | |
# the first times rsync can take a bit long - do not disable flusing | |
rsync -a $FROM $TO | |
# now disable flushing and do one manual flushing |