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
# | |
# c - bash directory changing functions that maintain a | |
# most-recently used stack. | |
# | |
# Run with -help as an argument to see invocation options, or find the | |
# d_usage function below. | |
# | |
# To use these functions, store this in a file someplace and | |
# then execute | |
# |
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
#!/bin/sh | |
case $# in | |
0) echo "usage: `basename $0` pattern"; exit 1;; | |
esac | |
for i in "$@" | |
do | |
grep -i "$i" - <<EOTEOT | |
CONTINUE = 100 |
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 twisted.internet import defer | |
from twisted.python import failure | |
class DeferredPooler(object): | |
def __init__(self, func): | |
self._func = func | |
self._pool = {} | |
def _callOthers(self, result, key): |
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 twisted.internet import defer, fail, succeed | |
from twisted.python import failure | |
class DeferredMemoizer(object): | |
def __init__(self, func): | |
self._func = func | |
self._pool = {} | |
self._results = {} |
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 responseCallback(response): | |
_logger.debug('Received response from ' + url) | |
if response.code == 200: | |
deliveryProtocol = ResponseConsumer(result, JSONSolrResponse) | |
response.deliverBody(deliveryProtocol) | |
else: | |
deliveryProtocol = DiscardingResponseConsumer() | |
response.deliverBody(deliveryProtocol) | |
result.errback(HTTPWrongStatus(response.code)) |
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
t61p /tmp/git-test $ git init . | |
Initialized empty Git repository in /tmp/git-test/.git/ | |
t61p /tmp/git-test (master) $ touch README | |
t61p /tmp/git-test (master) $ git add README | |
t61p /tmp/git-test (master) $ git commit -m "First commit" | |
[master (root-commit) eb68fa6] First commit | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 README | |
t61p /tmp/git-test (master) $ touch README2 | |
t61p /tmp/git-test (master) $ git checkout -b newbranch |
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
t61p ~/fluidinfo/src/fluiddb (integrate-oauth-1297) $ git branch | |
* integrate-oauth-1297 | |
master | |
t61p ~/fluidinfo/src/fluiddb (integrate-oauth-1297) $ git fetch [email protected]:jkakar/fluiddb.git oauth-echo-token-1289:oauth-echo-token-1289 | |
From github.com:jkakar/fluiddb | |
* [new branch] oauth-echo-token-1289 -> oauth-echo-token-1289 | |
t61p ~/fluidinfo/src/fluiddb (integrate-oauth-1297) $ git branch | |
* integrate-oauth-1297 | |
master | |
oauth-echo-token-1289 |
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
(require 'fluiddb) | |
(setq *fluiddb-credentials* '("terrycojones" . "SECRET")) | |
(defun insert-lastpage (who) | |
(interactive "sInsert the last URL of which user? ") | |
(let* | |
((user (or who (car *fluiddb-credentials*))) | |
(result (fluiddb-query-objects-tag-values | |
(format "has %s/lastpage" user) | |
'("fluiddb/about")))) |
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
(require 'fluiddb) | |
(setq *fluiddb-credentials* '("terrycojones" . "SECRET")) | |
(defun insert-clipboard (who) | |
(interactive "sInsert the clipboard of which user? ") | |
(let* | |
((user (if (equal who "") (car *fluiddb-credentials*) who)) | |
(tag (format "%s/clipboard" user)) | |
(result (fluiddb-query-objects-tag-values (format "has %s" tag) (list tag)))) | |
(insert (cdr (car (cdr (car (cdr (car (cdr (car (cdr (car (car (cdr result))))))))))))))) |
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
#!/bin/bash | |
set -x -e | |
# update master first | |
git checkout master | |
git pull upstream master | |
git push origin master | |
REVIEW_BRANCH_NAME=_reviewbranch |
OlderNewer