This gist has been migrated to a real repository: https://github.com/wolever/openssl-x509-scripts
This file contains 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
- Specific Notmuch filters (and saved-searches) for: | |
+ The Feed (newsletters, blogs) | |
+ The Paper trail (receipts, ledger) | |
+ Screened Inbox (mail from folks you actually want to read) | |
+ Previously Seen (important mail that you've already read) | |
+ Unscreened Inbox (potential spam / stuff you don't want) | |
- Elisp Functions to move / categorize emails from a particular sender. | |
+ Adds tags needed by filters defined above to all email sent by a particular sender | |
+ Creates an entry in a DB file, which is used by the Notmuch post-new script when indexing new email, to auto-add the relevant tags. |
This file contains 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
#!/bin/bash | |
# Reverts HEAD back to ORIG_HEAD, for example after a 'git pull' accidentally | |
# creates a merge. This is identical to running 'git reset --hard ORIG_HEAD', | |
# except that unpull prints some helpful information along the way. | |
# Useage: | |
# $ git unpull | |
# HEAD: a0ac0fd Merge branch 'master' of /tmp/foo | |
# 2284c9d some remote commit | |
# ORIG_HEAD: 35431fd my local commit | |
# Really reset HEAD to ORIG_HEAD? (y/n) y |
This file contains 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
import inspect | |
def marmoset_patch(func, s, r): | |
source = inspect.getsource(func).replace(s, r) | |
exec source in func.func_globals | |
func.func_code = func.func_globals[func.__name__].func_code | |
def foo(): | |
print 1 | |
print 2 |
This file contains 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 pqueue import PersistentQueue | |
q1 = PersistentQueue("/tmp/queue_storage_dir") | |
q1.put("1") | |
q1.put("2") | |
q1.put("3") | |
q1.close() | |
q2 = PersistentQueue("/tmp/queue_storage_dir") | |
while not q2.empty(): |