Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
jefftriplett / pyhowl.py
Created September 20, 2011 05:36
Post to Howl (http://howlapp.com) from Python
"""
pyhowl - Post to Howl (http://howlapp.com)
Copyright (c) 2011, Jeff Triplett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@leah
leah / json-response.py
Created October 5, 2011 19:08
JSONResponse classes
import re
import simplejson
from django.http import HttpResponse
from django.conf import settings
class JSONResponse(HttpResponse):
def __init__(self, request, data):
indent = 2 if settings.DEBUG else None
@toastdriven
toastdriven / profiling.rst
Created November 9, 2011 06:42
Getting QCacheGrind Running & Working With Python Profilers

Get QCacheGrind Running

  • brew install qt --with-qt3support
  • brew install graphviz
  • sudo ln -s /usr/local/bin/dot /usr/bin/dot (?)
  • svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/kcachegrind kcachegrind
  • cd kcachegrind/qcachegrind
  • qmake -spec 'macx-g++'
  • make
@codysoyland
codysoyland / gateway.sh
Created January 11, 2012 00:14
fabric gateway script
#!/bin/sh
echo $* | ssh gateway "cat > /tmp/fab-runner; chmod +x /tmp/fab-runner"
ssh gateway -t screen bash -init-file /tmp/fab-runner
# Usage: gateway.sh fab production deploy
@ktheory
ktheory / check_aws_status.rb
Created January 13, 2012 05:11
Nagios plugin to check AWS Status RSS feeds
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'net/http'
# check_aws_status.rb
# A nagios plugin for fetching RSS feeds from http://status.aws.amazon.com.
# Source: https://gist.github.com/1604786
# Written by Aaron Suggs: https://github.com/ktheory
@cspanring
cspanring / tastyhacks.py
Created February 8, 2012 18:25
Add GeoJSON support for geometry fields in django-tastypie
# Shamelessly stolen from https://github.com/newsapps/django-boundaryservice/blob/master/boundaryservice/tastyhacks.py
from django.contrib.gis.db.models import GeometryField
from django.utils import simplejson
from tastypie.bundle import Bundle
from tastypie.fields import ApiField, CharField
from tastypie.resources import ModelResource

iPad Apps

Post first weekend with the iPad 3, here are some apps I really like. Many are Plus apps.

  • Dropbox
  • Penultimate
  • Tweetbot - iPad
  • ByWord

    - Alternatives

@jacobian
jacobian / pip-cache-install.py
Created May 1, 2012 05:22
Install a package from your local pip download cache without touching the 'net.
#!/usr/bin/env python
"""
Install a package from your local pip download cache without having to touch
the 'net at all.
You'll need to be using a pip download cache; that is, you'll need the
following in your ~/.pip/pip.cfg:
[install]
@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
'''
{
"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": "<",