Skip to content

Instantly share code, notes, and snippets.

import os
import re
import sys
CITE_KEY_RE = re.compile(ur"\s*:CITE-KEY:\s*(\w+)(-\d+)?", re.IGNORECASE)
PROPERTIES_RE = re.compile(ur"(\s*):PROPERTIES:\s*", re.IGNORECASE)
END_RE = re.compile(ur"\s*:END:\s*", re.IGNORECASE)
citeKeys = {}
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@priyadarshan
priyadarshan / reorg_library.py
Created May 27, 2013 20:25
Reorganise Library
import os
import re
import subprocess
import sys
PART_RE = re.compile(ur"^(.+)-part-\d+$")
if __name__ == "__main__":
;; Keybonds
(global-set-key [(hyper a)] 'mark-whole-buffer)
(global-set-key [(hyper v)] 'yank)
(global-set-key [(hyper c)] 'kill-ring-save)
(global-set-key [(hyper s)] 'save-buffer)
(global-set-key [(hyper l)] 'goto-line)
(global-set-key [(hyper w)]
(lambda () (interactive) (delete-window)))
(global-set-key [(hyper z)] 'undo)
(defun mac-osx-editing-insert-at ()
"Insert @ at point"
(interactive)
(insert-char ?@ 1))
(defun mac-osx-editing-insert-curly-left ()
"Insert { at point"
(interactive)
(insert-char ?{ 1))
#!/usr/bin/python
"""\
A command-line utility that can (re)send all messages in an mbox file
to a specific email address, with options for controlling the rate at
which they are sent, etc.
"""
# I got this script from Robin Dunn a few years ago, see
# https://github.com/wojdyr/fityk/wiki/MigrationToGoogleGroups
import os
import re
import subprocess
import sys
PART_RE = re.compile(ur"^(.+)-part-\d+$")
if __name__ == "__main__":
#!/usr/bin/env python
import os.path
import re
import sys
POEM_RE = re.compile(ur"\s*:GENRE:\s*poem\s*", re.IGNORECASE)
END_RE = re.compile(ur"\s*:END:\s*", re.IGNORECASE)
SECTION_RE = re.compile(ur"[#*]")
BEGIN_VERSE_RE = re.compile(ur"\s*#\+BEGIN_VERSE")
#!/usr/bin/env ruby
#
# Converts VCard to org-mode/org-contacts files
#
# 2012 by Simon Thum
#
# Requires the vpim gem, which in turn needs patches to run (github xing/vpim)
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer