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
@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 / extract_zips.sh
Created January 25, 2012 18:51
unzip all *.zip files in a folder and extract them into a folder of the same name
for f in `ls *.zip | cut -f1 -d '.'`; do unzip -o $f.zip -d $f/; done
@jefftriplett
jefftriplett / gist:1755163
Created February 6, 2012 21:52
diff two folders and remove things we don't care about such as git.
diff -rq folder_camera_1 folder_camera_2 | grep -v -e '.git*'
@jefftriplett
jefftriplett / scrape_list.txt
Created March 13, 2012 17:44
my pycon to-watch (scrape) list
http://pyvideo.org/video/715/building-a-python-based-search-engine
http://pyvideo.org/video/719/diversity-in-practice-how-the-boston-python-user
http://pyvideo.org/video/713/improving-documentation-with-beginners-mind-o
http://pyvideo.org/video/708/parsing-horrible-things-with-python
http://pyvideo.org/video/716/parsing-sentences-with-the-other-natural-language
http://pyvideo.org/video/672/making-maps-with-python
http://pyvideo.org/video/676/python-for-data-lovers-explore-it-analyze-it-m
http://pyvideo.org/video/699/testing-and-django
http://pyvideo.org/video/677/using-fabric-to-standardize-the-development-proce
http://pyvideo.org/video/638/advanced-security-topics
@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 / fabfile.py
Created May 4, 2012 01:25
A very basic python + fabric + boto script for setting up a VPN using EC2
'''
Based on:
- Read this for EC2 setup info and the approach - http://www.dikant.de/2010/10/08/setting-up-a-vpn-server-on-amazon-ec2/
- https://gist.github.com/1130401
- EC2 fabric bits via - https://github.com/slacy/fabric-ec2
'''
import boto
@jefftriplett
jefftriplett / fabfile.py
Created May 4, 2012 01:25
A very basic python + fabric + boto script for setting up a VPN using EC2
'''
Warning! Your mileage may vary
Based on:
- Read this for EC2 setup info and the approach - http://www.dikant.de/2010/10/08/setting-up-a-vpn-server-on-amazon-ec2/
- https://gist.github.com/1130401
- EC2 fabric bits via - https://github.com/slacy/fabric-ec2
'''
@jefftriplett
jefftriplett / lowercase.sh
Created May 18, 2012 21:55
rename every file in a folder to lowercase
#!/bin/bash
# file this under things I should no but have to look up every f!@#$ time...
# via: http://stackoverflow.com/questions/7787029/how-do-i-rename-all-files-to-lowercase
for f in *; do mv "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done
{
"auto_complete": false,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",