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
# When Tab is pressed on an empty(!) command line, the contents of the | |
# directory are printed (`ls`) instead of a menu list of all | |
# executables: | |
function my-hg-report() { | |
tip=$(hg tip 2> /dev/null) || return | |
echo | |
hg --config pager.pager= status | |
echo | |
hg --config pager.pager= log --limit 5 --style compact |
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
(ns soka-trb.jdbc-streaming | |
"streaming results in clojure.java.jdbc, when {:use-streaming? true} is passed | |
as option | |
hooks into jdbc/prepare-statements and calls turn-on-streaming | |
Users need to extend the TurnOnStreaming protocol for their databases | |
" | |
(:require [clojure.java.jdbc :as jdbc] | |
[robert.hooke])) |
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
# use ssh url instead of anonymous | |
[url "git@github.com:brainbot-com/"] | |
insteadOf = https://github.com/brainbot-com/ |
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
# save this as ~/.config/pep8 | |
[pep8] | |
ignore = E401,E501,E126,E123,E128,E127,E124,E122 | |
exclude = .svn,CVS,.bzr,.hg,.git,.tox,build |
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
#! /usr/bin/env python | |
import smtplib | |
_from = "ralf@pediapress.com" | |
_to = "schmir@gmail.com" | |
s = smtplib.SMTP("brainbot.com", 25) | |
s.set_debuglevel(True) | |
s.ehlo() |
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/buildout -c | |
[buildout] | |
extends = buildout.cfg | |
develop += | |
../fscrawler | |
[versions] | |
fscrawler= |
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 pytest, py, os | |
@pytest.fixture(autouse=True) | |
def chdir_tmpdir(request, tmpdir): | |
"""autouse fixture that chdirs to tmpdir""" | |
cwd = py.path.local(".") | |
tmpdir.chdir() | |
request.addfinalizer(cwd.chdir) |
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
# Copyright (c) 2007-2009 PediaPress GmbH | |
# See README.rst for additional licensing information. | |
"""custom json encoder/decoder, which can handle metabook objects""" | |
from mwlib import metabook | |
try: | |
import simplejson as json | |
except ImportError: |
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
# allow to silence error reporting for certain 'expected exceptions' | |
# gevent prints a error report including a traceback for each failed | |
# greenlet. this is at times useful, but you're currently forced to | |
# either handle exceptions in those greenlets or live with the traceback | |
# on stderr. | |
# patch_gevent introduces a class variable 'expected_exceptions' to | |
# gevent's greenlet class. This is a tuple of exceptions for which no | |
# error report should be printed to stderr. |
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
.file "greenlet.c" | |
.text | |
.p2align 4,,15 | |
.type green_is_gc, @function | |
green_is_gc: | |
.LFB148: | |
.cfi_startproc | |
cmpq $-1, 24(%rdi) | |
je .L3 | |
xorl %eax, %eax |
NewerOlder