I hereby claim:
- I am tilgovi on github.
- I am tilgovi (https://keybase.io/tilgovi) on keybase.
- I have a public key whose fingerprint is 9255 5CDE B2C1 5E97 0AD8 FDE8 5994 A5A1 8F13 626A
To claim this, I am signing this object:
diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py | |
index 6062117..a681420 100644 | |
--- a/gunicorn/app/base.py | |
+++ b/gunicorn/app/base.py | |
@@ -38,6 +38,7 @@ class Application(object): | |
self.callable = None | |
self.logger = None | |
self.do_load_config() | |
+ self.__handlers = None | |
(defun balance-margins () | |
"This function balances the margins of all windows on the selected | |
frame such that the first column and the fill column are the same | |
distance from the left and right edge, respectively." | |
(walk-windows | |
(lambda (window) | |
(let* ((total-width (window-total-width window)) | |
(fringe-width (apply '+ (butlast (window-fringes window)))) | |
(scroll-bar-width (window-scroll-bar-width window)) | |
(divider-width (window-right-divider-width window)) |
/* This is the call-with-current-continuation found in Scheme and other | |
* Lisps. It captures the current call context and passes a callback to | |
* resume it as an argument to the function. Here, I've modified it to fit | |
* JavaScript and node.js paradigms by making it a method on Function | |
* objects and using function (err, result) style callbacks. | |
*/ | |
Function.prototype.callcc = function(context /* args... */) { | |
var that = this, | |
caller = Fiber.current, | |
fiber = Fiber(function () { |
I hereby claim:
To claim this, I am signing this object:
For Hypothes.is, I've been using git describe
s --always
option for generating version numbers. However, Chrome apps can only have digits (and '.') in their version identifiers. For that reason, instead of ending up with 0.0.6-1371-g93b5d9d
(which is what versioneer generates for me), I've been publishing extensions that strip off the git hash.
When something goes wrong in production, the clear question is "what git hash was this extension built from?"
Here's my bash script to recover a git hash from a version like "0.0.6-1371" (in our case this means 1371 commits since v0.0.6).
It's easy: use git rev-list
to count the commits since the tag. Then, subtract from that the trailing count in our version number to get the difference. Finally, skip back that amount from HEAD (important: in topological order).
#!/bin/bash | |
while IFS=" " read -ra LINE; do | |
REF=${LINE[2]} | |
HEAD=`echo ${REF} | awk '{print $NF}' | awk -F/ '{print $NF}'` | |
GIT_WORK_TREE=~/${HEAD} git checkout -f ${REF} | |
source ~/${HEAD}/bin/activate | |
pip install -r ~/${HEAD}/requirements.txt | |
pip install ~/${HEAD} | |
deactivate |
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
import json | |
import jsonld | |
import pprint | |
import rdflib | |
import rdflib_jsonld |
# Return true if the given predicate is true for every Node of the tree. | |
# The predicate function is invoked once for each Node in the tree. | |
# An optional third argument specifies a traversal order and should be a | |
# function that takes a Node and returns its successor. The default order is | |
# DOM position order (pre-order). | |
everyNode = (node, fn, next = preFirst) -> | |
return !someNode(node, ((n) -> !fn(n)), next) | |
# Return the first Node in the tree that matches the predicate. |
The above grid shows the effect of fisheye distortion. Move the mouse to change the focal point.
""" | |
If a virtual environment is active, make sure it's being used. | |
Globally-installed console scripts use an absolute shebang path which | |
prevents them from importing packages in the virtualenv. | |
""" | |
import os | |
import os.path | |
if 'VIRTUAL_ENV' in os.environ: |