Skip to content

Instantly share code, notes, and snippets.

View gregnewman's full-sized avatar

Greg Newman gregnewman

View GitHub Profile
(defvar org-my-archive-expiry-days 1
"The number of days after which a completed task should be auto-archived.
This can be 0 for immediate, or a floating point value.")
(defconst org-my-ts-regexp "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]>\r\n]*?\\)[]>]"
"Regular expression for fast inactive time stamp matching.")
(defun org-my-closing-time ()
(let* ((state-regexp
(concat "- State \"\\(?:" (regexp-opt org-done-keywords)
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
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
=====================
Readernaut Public API
=====================
1.0 (pre-release)
=================
Reader Books
------------
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
@gregnewman
gregnewman / license
Created January 27, 2010 10:34 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
year=`date "+%Y"`
cat <<EOF
Copyright (c) $year Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
<style type="text/css" media="screen print">
* {
font-family: Helvetica,Arial,sans-serif;
font-size: 8px;
}
table {
border-collapse: collapse;
}
</style>
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
>>> 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'),
#!/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>