Skip to content

Instantly share code, notes, and snippets.

jesse@admin-console-002:~ $ telnet 10.40.5.2 80
Trying 10.40.5.2...
Connected to 10.40.5.2.
Escape character is '^]'.
GET /
HTTP/1.0 302 Redirect
Server: GoAhead-Webs
Date: Tue Feb 16 19:46:32 2010
Pragma: no-cache
#!/bin/sh
YEAR=`date -d 'yesterday' +%Y`
MONTH=`date -d 'yesterday' +%m`
DAY=`date -d 'yesterday' +%d`
#DAY=19
echo grep -B2 -A3 contains /vol/syslog/HOSTS/db-*/$YEAR/$MONTH/$DAY/local3
@jessejajit
jessejajit / fabfile.py
Created August 12, 2012 05:52 — forked from cyberdelia/fabfile.py
Fabric deploy script with : south migrations, rollback and maintenance page.
from fabric.api import env, run, sudo, local, put
def production():
"""Defines production environment"""
env.user = "deploy"
env.hosts = ['example.com',]
env.base_dir = "/var/www"
env.app_name = "app"
env.domain_name = "app.example.com"
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name }
@jessejajit
jessejajit / setup-statsd.sh
Created July 19, 2012 07:08 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# for those super bare-bones systems...
sudo apt-get install gcc make
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make