This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ui] | |
username = Josh Ourisman <[email protected]> | |
[extensions] | |
fetch= | |
hgext.mq= | |
hgext.convert= | |
color= | |
rebase= | |
hgsubversion=~/.hg.d/hgsubversion/hgsubversion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple way to see which version of django apps you have | |
# Author: Alexander Artemenko | |
import pkg_resources | |
from django.conf import settings | |
def get_version(app): | |
try: | |
d = pkg_resources.get_distribution(app) | |
return d.project_name, d.version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.contrib.auth.models import User | |
from django.utils.translation import ugettext_lazy as _ | |
from django.core.cache import cache | |
RELATIONSHIP_CACHE = 60*60*24*7 | |
RELATIONSHIP_CACHE_KEYS = { | |
'FRIENDS': 'friends', | |
'FOLLOWERS': 'followers', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.contrib.auth.models import User | |
from django.utils.translation import ugettext_lazy as _ | |
from django.core.cache import cache | |
RELATIONSHIP_CACHE = 60*60*24*7 | |
RELATIONSHIP_CACHE_KEYS = { | |
'FRIENDS': 'friends', | |
'FOLLOWERS': 'followers', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(load-library "iso-transl") | |
(add-to-list 'load-path "~/.emacs.d/vendor/org-mode/lisp") | |
(add-to-list 'load-path "~/.emacs.d/vendor/org-mode/contrib/lisp") | |
(add-to-list 'load-path "~/.emacs.d/vendor") | |
(progn (cd "~/.emacs.d/vendor") | |
(normal-top-level-add-subdirs-to-load-path)) | |
(defconst emacs-config-dir "~/.emacs.d/configs/" "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def random_date(start, end): | |
""" | |
Returns a random datetime between two datetime objects. | |
""" | |
delta = end - start | |
int_delta = (delta.days * 24 * 60 * 60) + delta.seconds | |
random_second = randrange(int_delta) | |
return (start + timedelta(seconds=random_second)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Syntax Check using flymake and PyFlakes EMACS 23.x | |
;;; GUI Emacs 23.x on Mac OS X has problems respecting | |
;;; system paths so we have to add it manually with setq | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(setq pyflakes "/usr/local/bin/pyflakes") | |
(when (load "flymake" t) | |
(defun flymake-pyflakes-init () |