Skip to content

Instantly share code, notes, and snippets.

View lukeman's full-sized avatar

Luke Hatcher lukeman

View GitHub Profile
$ cd ~/Library/Mail
$ sqlite3 Envelope\ Index
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> select avg(size) from messages;
32984.7982999518
#!/bin/sh
osascript -e 'tell application "Tweetie"' -e "quit" -e "end tell"
defaults write com.atebits.tweetie-mac filterTerms -array-add "#pycon"
osascript -e 'tell application "Tweetie"' -e "open" -e "end tell"
@lukeman
lukeman / gist:386835
Created May 2, 2010 02:14
Example of using django-sorting, django-filter and django-pagination together
{% load pagination_tags %}
{% load sorting_tags %}
{% block body %}
{% autosort filter.qs as sorted_objects %}
{% autopaginate sorted_objects 10 as object_list %}
{% for object in object_list %}
{{ object }}
@lukeman
lukeman / gist:949011
Created April 29, 2011 20:44
pinax 0.7.3 boot script with virtualenv 1.6
#!/usr/bin/env python
## WARNING: This file is generated
"""Create a "virtual" Python installation
"""
# If you change the version here, change it in setup.py
# and docs/conf.py as well.
virtualenv_version = "1.6"
import base64
@lukeman
lukeman / gist:2155355
Created March 22, 2012 03:06
Apple Domains
#! /usr/bin/perl
# version 1.1
# if the host+path are in matrix then the redirect is to a single location
# if just the host is in matrix then the redirect is to host+the request uri
# nwk-productred 17.149.160.28&nbsp&amp&nbsp17.172.224.28
#
# to distibute this file us /usr/local/scr/distfilex
#
#
@lukeman
lukeman / dabblet.css
Created October 29, 2015 04:38 — forked from csssecrets/dabblet.css
Folded corner effect — at an angle
/**
* Folded corner effect — at an angle
*/
div {
position: relative;
width: 12em;
background: #58a; /* Fallback */
background: linear-gradient(-150deg, transparent 1.5em, #58a 0);
padding: 2em;