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 | |
while read oldrev newrev refname | |
do | |
if [[ $refname =~ (hotfixes)|(qa)|(dev) ]] ; then | |
echo "ensuring no trivial merges in $refname" >&2 | |
for hash in $(git log --format=%H --merges $oldrev..$newrev) | |
do | |
echo "checking $hash" >&2 | |
if [[ ($refname =~ /qa$ && "$(git log --format=%H ^$hash^2 qa | wc)" == "$(git log --format=%H qa | wc)") | |
|| ($refname =~ /dev$ && "$(git log --format=%H ^$hash^2 dev | wc)" == "$(git log --format=%H dev | wc)") |
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
test: | |
@bash $@ | |
.PHONY: test |
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
Plugin architecture based on "sub-class discovery method" described in a talk | |
by Dr. André Roberge. The talk is called "Plugins and monkeypatching: | |
increasing flexibility, dealing with inflexibility". | |
Here's the talk recorded at PyCon 2009 in Chicago: | |
http://us.pycon.org/2009/conference/schedule/event/47/ | |
Plugin writer HOWTO: | |
1. subclass "Base" | |
2. implement sayHi() |
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
欢迎来到Mifos管理区域 |
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 multiprocessing | |
import time | |
def mytask(num): | |
print('Started task, sleeping %s' % num) | |
time.sleep(num) | |
pool = multiprocessing.Pool(4) | |
jobs = pool.map_async(mytask, [1,2,3,4,5,3,2,3,4,5,2,3,2,3,4,5,6,4], chunksize=1) | |
pool.close() |
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 | |
tmpdir=`mktemp -d` | |
echo creating new repo in $tmpdir | |
set -x | |
cd $tmpdir | |
git init | |
echo -e 'blah\nfoo\nbar' > a | |
echo -e 'hello world' > b | |
git add a b | |
git commit -am 'first' |
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
bLah |
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
Section "ServerLayout" | |
Identifier "amdcccle Layout" | |
Screen 0 "amdcccle-Screen[1]-0" 0 0 | |
EndSection | |
Section "Monitor" | |
Identifier "0-DFP2" | |
Option "VendorName" "ATI Proprietary Driver" | |
Option "ModelName" "Generic Autodetecting Monitor" | |
Option "DPMS" "true" |
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
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: CA key usage check failed: keyCertSign bit is not set | |
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) | |
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1665) | |
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:257) | |
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:251) | |
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1165) | |
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:154) | |
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:609) | |
at sun.security.ssl.Handshaker.process_record(Handshaker.java:545) | |
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:913) |
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
git-lfnw-2012.html: git-lfnw-2012.txt | |
pandoc -w slidy -s $< > $@ | |
.DELETE_ON_ERROR: |
OlderNewer