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
type customSqlx struct { | |
*sqlx.DB | |
} | |
func ( db *customSqlx ) Get(dest interface{}, query string, args ...interface{}) error { | |
// db.trace(query,args) | |
return db.DB.Get(dest,query,args) | |
} |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
pip install networkx distance pattern | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[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
use strict; | |
use warnings FATAL => 'all'; | |
use Module::Runtime qw[ use_module ]; | |
my @noversions; | |
for(<>) { | |
chomp; | |
my $class= $_; | |
use_module($class) or die "$@ $!"; | |
my $v = UNIVERSAL::VERSION($class); | |
push(@noversions,$class) and next unless $v; |
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
hullo |
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.push: %.git | |
cd $*.git && git fetch origin && git push github 2>&1 >> ~/github.log | |
%.git: | |
[ -e $*/config ] || git clone --mirror git@private-git-host:$* \ | |
&& cd $*.git && git remote add --mirror=push github [email protected]:PrivateOrganization/$* | |
#put this Makefile in github_mirror@yourserver:~/repos/ | |
#Then copy the following 2 lines into private-git-hosts's post-receive hook for the repo: | |
#GITDIRNAME=pwd | perl -w -ne 'my ($dir) = reverse split(/\//); print $dir' |