Skip to content

Instantly share code, notes, and snippets.

View rossdylan's full-sized avatar

Ross Delinger rossdylan

View GitHub Profile
@ralphbean
ralphbean / .taskrc
Created February 13, 2012 18:20
taskrc
# Files
data.location=/home/threebean/.task
#include /home/threebean/.task/solarized-dark-256.theme
_forcecolor=yes
defaultwidth=160
include /usr/local/share/doc/task/rc/dark-violets-256.theme
report.work_report.description=now
def run_pg_fouine():
info = host_info[env.host_string]
db_name = info.tags.get('Name')
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
time.sleep(30)
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt')
run('gzip -f /tmp/pgfouine.txt')
@eatnumber1
eatnumber1 / sls.c
Created January 14, 2013 18:49
A awesome^H^H^H^H^H^H^Hdisgusting use of the stack in C.
#include <stdio.h>
#include <setjmp.h>
#include <stddef.h>
#include <string.h>
#define NORETURN __attribute__((noreturn))
typedef void (*AllocCont)( void * );
void NORETURN longjmp_on_return( AllocCont f, jmp_buf env, void *mem ) {