my $caller = (caller(1))[3];
damp $caller;
2016/06/22
2016/06/16
Ag on Ubuntu
Ag (a.k.a. the_silver_searcher) on Ubuntu 12.04 LTS:
wget 'http://swiftsignal.com/packages/ubuntu/precise/the-silver-searcher_0.14-1_amd64.deb'
sudo dpkg -i the-silver-searcher_0.14-1_amd64.deb
2016/06/07
2016/03/15
Read query param via JS
var match = RegExp('[?&]' + param + '=([^&#]*)').exec(window.location.search);
var value = match && decodeURIComponent(match[1].replace(/\+/g, ' '));
var value = match && decodeURIComponent(match[1].replace(/\+/g, ' '));
2016/03/04
2016/02/11
Bash functions
# Usage: many 'echo 123'
many () { for i in {1..10}; do $1; done; }
many () { for i in {1..10}; do echo -e "\n-= $i =-\n" && $1 && sleep 3; done; }
# Usage: many 10 'echo 123'
many () { for ((i=1; i<=$1; i++)); do echo -e "\n-= $i =-\n" && $2 && sleep 3; done; }
many () { for i in {1..10}; do $1; done; }
many () { for i in {1..10}; do echo -e "\n-= $i =-\n" && $1 && sleep 3; done; }
# Usage: many 10 'echo 123'
many () { for ((i=1; i<=$1; i++)); do echo -e "\n-= $i =-\n" && $2 && sleep 3; done; }
2016/01/26
Subscribe to:
Posts (Atom)