This file contains hidden or 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/perl | |
use Modern::Perl; | |
use JSON; | |
use Plack::Request; | |
use MARC::MIR; | |
use Test::Builder; | |
sub run_test { | |
my ( $mir ) = @_; | |
my $tb = Test::Builder->create; |
This file contains hidden or 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 zsh | |
dancer_pid= | |
dancer () { | |
perl bin/dancer & | |
dancer_pid=$! | |
} | |
kill_dancer () { kill $dancer_pid } | |
restart_dancer () { kill_dancer && dancer } | |
changes_in_source_tree () {inotifywait -r -e modify --exclude ".*swp" . } |
This file contains hidden or 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
; vim sw=4 | |
(ns compas.core | |
(:use compojure.core) | |
(:use hiccup.core) | |
(:require | |
[compojure.route :as route] | |
[compojure.handler :as handler] | |
) | |
) |
This file contains hidden or 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
# default values for all boxes | |
Sync Full | |
Expunge Both | |
# root of the local storage | |
MaildirStore local | |
Path ~/local/mail/ | |
Trash Trash | |
# remote box |
This file contains hidden or 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 ElasticSearch; | |
my $es = ElasticSearch->new(qw/ servers localhost:9200 /) or die; | |
$es->error_trace(1); | |
say YAML::Dump $es->search( qw/ index log type log query /, | |
{ text => {qw/ id bb303ab02dded9577a87db0e82649f77cf4f51c8c8198860cc29b64321336c92:2011-10-04:16/} | |
} | |
); | |
__END__ |
This file contains hidden or 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
> cat ~/.gitconfig | |
[alias] | |
oll = log --oneline | |
ba = branch -a | |
cm = checkout master | |
cs = checkout stage | |
cd = checkout devel | |
co = checkout | |
s = status -s | |
ci = commit |
This file contains hidden or 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
precmd () { | |
local gitwhere=$( stfu2 git symbolic-ref HEAD) | |
[[ -n $gitwhere ]] || gitwhere=$( stfu2 git describe) | |
[[ -n $gitwhere ]] && { | |
local modif=`git s|wc -l` | |
[[ $modif = 0 ]] && modif="" || modif="($modif files modified)" | |
gitwhere="[${gitwhere##*/}$modif]" | |
} | |
export PS1="[%T] %n@%M%b:%d $gitwhere"$'\n'"> " | |
} |
This file contains hidden or 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
set -e | |
cd /rtgi/modules/Local-Lib | |
export PERL_MB_OPT="--install_base $PWD" | |
export PERL_MM_OPT="INSTALL_BASE=$PWD" | |
git checkout perl-5.12.3-devel | |
git pull | |
candidate="$1" |
This file contains hidden or 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/perl | |
use Modern::Perl; | |
use YAML; | |
# Net::Grammars::Digzone; | |
# possible bugs: no empty line available | |
# http://en.wikipedia.org/wiki/List_of_DNS_record_types | |
my $parse_dig_zone = do { | |
use Regexp::Grammars; | |
qr{ |
This file contains hidden or 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 Ouesh; | |
# predefined classic commands (as plugin ?) | |
authorize_rsync_server; | |
# run command if returns true | |
binary cat => sub { | |
not ( '/etc/shadow' ~~ $BINARGS) | |
}; |
NewerOlder