wget https://github.com/zeromq/zeromq2-x/zipball/v2.1.7
unzip v2.1.7
cd zeromq-zeromq2-x-f05ff4d
sudo apt-get install uuid-dev
/* | |
* See http://mathiasbynens.be/notes/async-analytics-snippet#comment-14 | |
*/ | |
<script> | |
var clicky = (function f(){return {log:f, goal:f};})(), | |
clicky_site_id = XXXXXX; | |
(function(d, t) { | |
var c = d.createElement(t), | |
s = d.getElementsByTagName(t)[0]; |
# This is how you install syntax checking for JavaScript in vim | |
mkdir -p ~/.vim/autoload ~/.vim/bundle; \ | |
curl -so ~/.vim/autoload/pathogen.vim \ | |
https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim | |
npm install -g jshint | |
cd ~/.vim/bundle | |
git clone https://github.com/scrooloose/syntastic.git |
*Elastic Search* | |
Grab the deb packages for Elasticsearch from http://www.elasticsearch.org/download/ and both the Graylog2 server and web interface from http://graylog2.org/download. | |
#install the elastic search from debian | |
dpkg -i elasticsearch-0.19.3.deb |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
.DS_Store | |
node.json | |
tmp/ |
$ curl -PUT http://localhost:9200/xyz/message/_mapping?pretty=true -d '{"message" : {"_routing": { "path": "_org"} }}' | |
Output | |
{ | |
"ok" : true, | |
"acknowledged" : true | |
} | |
#!/bin/bash | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
#~/.local/share/applications/mimeapps.list | |
[Added Associations] | |
#... | |
x-scheme-handler/subl=subl-urlhandler.desktop |