Skip to content

Instantly share code, notes, and snippets.

<svg version="1.1" id="4fd10ef2fd8774ade500001c" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" space="preserve" title="Visual.ly Chart " Title="Visual.ly Chart ">
<g id="_x40_starcraft-tournamentwinningsarea" transform="translate(255.55470275878906,7.853499889373779)"><rect class="bgRect" width="253.3192138671875" height="150" x="0" y="0" style="fill: #ffffff; opacity: 0; "></rect><g class="chart_axes"></g><g class="chart_extra"><g class="chart_lines"><rect class="odd" y="0" height="150" x="0" width="1.6776106878621688" style="fill: #336699; fill-opacity: 0.2; "></rect><rect class="odd" y="0" height="150" x="0" width="1.6776106878621688" style="fill: #74a9cf; fill-opacity: 0.7; "></rect></g><g class="chart_lines"><rect class="even" y="0" height="150" x="1.6776106878621688" width="1.6776106878621688" style="fill: #74a9cf; fill-opacity: 0.2; "></rect><rect class="even" y="0" hei
@jtimberman
jtimberman / rename-node.rb
Created March 2, 2012 07:47 — forked from mpasternacki/rename-node.rb
A knife exec script to change Chef node's name.
#!./bin/knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@joemiller
joemiller / sensu-handler-input-example.json
Created February 2, 2012 11:33
example json data passed into Sensu handlers via STDIN
{
"client":{
"name":"host01",
"address":"10.2.1.11",
"subscriptions":[
"all",
"env_qa",
"frontend",
"proxy",
"apache"
@turicas
turicas / Makefile
Created December 3, 2011 23:22
Create slugs and abbreviate names using Python
test:
clear
nosetests --with-coverage --cover-package name_utils test_name_utils.py
clean:
find -regex '.*\.pyc' -exec rm {} \;
find -regex '.*~' -exec rm {} \;
.PHONY: test clean
@bohde
bohde / graphite_pip_uwsgi_recipe.sh
Created November 28, 2011 18:08 — forked from bfritz/graphite_pip_uwsgi_recipe.sh
installing graphite-web with pip and running under uwsgi
# graphite-web install is hardcoded in setup.cfg to /opt/graphite
sudo mkdir /opt/graphite
sudo chown brad.users /opt/graphite
# run under python2.7 virtualenv
virtualenv --python=python2.7 ~/ve/graphite
source ~/ve/graphite/bin/activate
# install the necessary python packages (simplejson is for flot graphs)
pip install graphite-web carbon whisper django django-tagging uwsgi simplejson
@kirbysayshi
kirbysayshi / mass-aggregation-change.sh
Created November 23, 2011 17:14
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@Iristyle
Iristyle / install-graphite-ubuntu-11.10.sh
Created November 12, 2011 18:40
Install Graphite 0.9.9 on Ubuntu 11.10 on EC2 with NGinx, uwsgi, supervisord, statsite, nagios agent
#!/bin/bash
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Ubuntu 11.10 Oneiric Ocelot
# Forked from https://gist.github.com/1287170
# Modified to use NGinx + uwsgi instead of Apache, as well as memcached and supervisord, incorporating ideas from
# http://blog.adku.com/2011/10/scalable-realtime-stats-with-graphite.html
@aaronshaf
aaronshaf / es.sh
Created September 3, 2011 03:53
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@csanz
csanz / using_repl.md
Created August 1, 2011 09:07
Debugging your Mongoose Models Using Repl

Debugging your Mongoose Models Using Repl

This is a faster way to test your mongoose models. The example below was based on the expressjs-blog example here

Example

$node
> var mongoose = require('mongoose')
> var db = mongoose.connect('mongodb://localhost/blogsample')

> db.model('BlogPost', require('./app/models/blogpost'))

@taf2
taf2 / reconnect-on-disconnect.js
Created July 1, 2011 15:51
mongoose node.js reconnect code
var mongoose = require('mongoose');
var db = mongoose.connect("mongodb://localhost/testdb");
var reconnTimer = null;
function tryReconnect() {
reconnTimer = null;
console.log("try to connect: %d", mongoose.connection.readyState);
db = mongoose.connect("mongodb://localhost/testdb");
}