Skip to content

Instantly share code, notes, and snippets.

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)
}
#!/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].
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;
%.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'