Skip to content

Instantly share code, notes, and snippets.

View gregnewman's full-sized avatar

Greg Newman gregnewman

View GitHub Profile
@gregnewman
gregnewman / gist:1653962
Created January 21, 2012 20:51
Homebrew forumula patched to allow fullscreen on Lion
cd /usr/local/Library/Formula
rm emacs.rb
wget https://raw.github.com/gist/1446720/36c7a3ab0ec8255e361dae11e0803cdf5cd09157/emacs.rb
brew install emacs --cocoa --lion
@gregnewman
gregnewman / gist:1156570
Created August 19, 2011 10:53
Example for Imagekit
class Book(models.Model):
title = models.CharField(max_length=200)
class Page(ImageModel):
book = models.ForeignKey(Book)
image = models.ImageField(upload_to='book_photos')
num_views = models.PositiveIntegerField(editable=False, default=0)
class IKOptions:
# This inner class to define the ImageKit options for the model
@gregnewman
gregnewman / #oldjobs
Created June 28, 2011 17:55
Old Jobs I've had...
Landscaper
Face painter
recording engineer
sales clerk at art store
pool boy
hotel bus driver
bus boy
1hr photo technician
convenience store manager
pizza delivery
@gregnewman
gregnewman / 13" MacBook Pro
Created February 12, 2011 19:40
For sale
13" Macbook Pro 4GB Ram 2.4Ghz 250GB hard drive
2.4Ghz proc is an intel core 2 duo
Ethernet, Fireware, mini-DVI, two USB, magsafe power, etc
apple care that I got with it makes the warranty good until 5/2013
Still has original packaging
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
1. While sitting at your desk in front of your computer, lift your right foot off the floor and make clockwise circles.
2. Now, while doing this, draw the number '6' in the air with your right hand.
Your foot will change direction.
Org-mode timetable for particular day(s)
C-c C-x C-r to insert a dynamic block for the current file or from the root of a tree.
To get a clock summary of the current level 1 tree, for the current day, you could write
#+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t
#+END: clocktable
and to use a specific time range you could write6
#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
>>> import appscript
>>> things = appscript.app("Things")
>>> things.lists.get()
[app(u'/Applications/Things.app').lists.ID(u'FocusInbox'),
app(u'/Applications/Things.app').lists.ID(u'FocusToday'),
app(u'/Applications/Things.app').lists.ID(u'FocusNextActions'),
app(u'/Applications/Things.app').lists.ID(u'FocusTickler'),
app(u'/Applications/Things.app').lists.ID(u'FocusMaybe'),
app(u'/Applications/Things.app').lists.ID(u'FocusActivityLevel-1'),
app(u'/Applications/Things.app').lists.ID(u'FocusLogbook'),
emacs -q --eval '(condition-case err (progn (load "~/.emacs") (kill-emacs 0)) (error (kill-emacs 1)))'
# Source http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/bed5b2bd8b237f5a?pli=1
<style type="text/css" media="screen print">
* {
font-family: Helvetica,Arial,sans-serif;
font-size: 8px;
}
table {
border-collapse: collapse;
}
</style>