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
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set bell-action none
set-option -g status-left ""
set-option -g status-right "#S"
set -g status-bg black
set -g status-fg white
set utf8-default on
/* Fix Redmine issue table issue.
This issue is only an issue with Webkit. Issue.
Something to do with the avatar float and the
table width … uhh … issue. So, one could say this
is a Webkit issue. :)
*/
div.issue.details table[width="100%"] {
width: 85% !important;
}
FROM MODEL
class Item(models.Model):
title = models.CharField(max_length=128)
photo = models.ImageField(upload_to="photos/",null=True, blank=True,)
description = models.TextField(null=True, blank=True,)
section = models.ForeignKey(Section)
order = models.IntegerField(null=True, blank=True,)
creation_date = models.DateTimeField(auto_now_add=True)
last_modified = models.DateTimeField(auto_now=True)
@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
@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: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 / 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 / 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.
*/
# Copyright Jehiah Czebotar 2013
# http://jehiah.cz/
import tornado.options
import glob
import os
import sqlite3
import logging
import datetime
import csv
@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