Skip to content

Instantly share code, notes, and snippets.

View jefftriplett's full-sized avatar
Living the dream

Jeff Triplett jefftriplett

Living the dream
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jefftriplett
jefftriplett / signals.py
Last active April 1, 2016 08:43 — forked from voldmar/signals.py
Django management command to trace / list all signals. My fork is just a few cleanups where CommandError wasn't referenced, etc.
# coding:utf-8
import gc
import inspect
import weakref
from django.core.management.base import BaseCommand, CommandError
from django.dispatch import Signal, saferef
from optparse import make_option
# Copyright Jehiah Czebotar 2013
# http://jehiah.cz/
import tornado.options
import glob
import os
import sqlite3
import logging
import datetime
import csv
@jefftriplett
jefftriplett / prowl.cpp
Created October 30, 2012 21:20 — forked from garrettreid/prowl.cpp
Updated Prowl module for ZNC
/*
* Copyright (C) 2009 flakes @ EFNet
* New match logic by Gm4n @ freenode
* Version 1.0 (2012-08-19)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
@jefftriplett
jefftriplett / managers.py
Created August 31, 2012 23:11 — forked from epicserve/managers.py
People Manager
from django.db.models import Manager
class ActivePeopleManager(Manager):
def get_query_set(self):
return super(ActivePeopleManager, self).get_query_set().filter(is_active=True)
class StaffPeopleManager(ActivePeopleManager):
@jefftriplett
jefftriplett / gist:2467386
Created April 22, 2012 22:51 — forked from jbarratt/gist:1343205
Bulk HandbrakeCLI Encoder
#!/bin/bash
find . -name "*.mkv" | while read FILE
do
# What would the output file be?
DST=/Volumes/USBRAID/Converted/$(dirname "$FILE")
MKV=$(basename "$FILE")
MP4=${MKV%%.mkv}.mp4
# If it already exists, don't overwrite it
if [ -e "$DST/$MP4" ]
@jefftriplett
jefftriplett / supervisord.sh
Created April 5, 2012 13:38 — forked from danmackinlay/supervisord.sh
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@jefftriplett
jefftriplett / gist:1418193
Created December 1, 2011 16:59 — forked from jacobian/gist:1225209
Pre-reqs for Strange Loop Machine Learning workshop - Mac + homebrew + virtualenv
brew install gfortran
mkvirtualenv --no-site-packages stl-mlearning
pip install pyyaml
pip install numpy
pip install scipy
wget http://nltk.googlecode.com/files/nltk-2.0.1rc1.zip
unzip http://nltk.googlecode.com/files/nltk-2.0.1rc1.zip
cd nltk
python setup.py install