View installed2cpanfile
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
$ perl installed2cpanfile > cpanfile | |
$ cpanm --installdeps . |
View bashrc
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 | |
if type -p readlink >/dev/null; then | |
alias abspath='readlink -f' | |
else | |
abspath() { | |
_CWD=$(pwd) | |
if [ -d "$1" ]; then | |
\cd $1 | |
echo $(pwd -P)/ |
View jsx
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
_jsx() | |
{ | |
local cur prev | |
COMPREPLY=() | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
JSX_OPTIONS='\ | |
--add-search-path\ | |
--executable\ | |
--run\ |
View search_cpan.pl
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/perl | |
use strict; | |
use warnings; | |
use URI::Escape qw( uri_escape ); | |
use HTTP::Lite; | |
use URI; | |
use Web::Scraper; | |
my $query = $ARGV[0] or die "query required\n"; | |
my $url = 'http://search.cpan.org/search?mode=module&n=100&q=' . uri_escape( $query ); |
View gist:247251
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/perl | |
use strict; | |
use warnings; | |
use Benchmark; | |
use Net::CIDR::Lite; | |
use Net::IP::Match::XS; | |
use Net::IP::Match::Bin; | |
use Net::IP::Match::Regexp; | |
use Net::Patricia; |
View gist:128411
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
(require 'perl-completion) | |
;; M-x perl-rename-buffer | |
(defun perl-rename-buffer () | |
(interactive) | |
(let ((package-name (plcmp-get-current-package-name))) | |
(when package-name | |
(rename-buffer package-name t)))) | |
;; (add-hook 'cperl-mode-hook |
View eyefi_receiver.rb
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/ruby | |
# | |
# Eye-fi receiver | |
# -- An imcomplete implementation of Gallery Remote Protocol Server | |
# by SHIDARA Yoji <dara@shidara.net> | |
# | |
# see http://codex.gallery2.org/Gallery_Remote:Protocol | |
# | |
require 'fileutils' | |
require 'sinatra' |
View gist.pl
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 perl | |
sub usage { | |
my $mesg = shift; | |
(my $prog = $0) =~ s!.+/!!; | |
print "[Error] $mesg\n" if $mesg; | |
print <<EOUSAGE; | |
[usage] | |
$prog [-p|-s] file1 file2 ... : submit specified files. |
View dan-the-shell.pl
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; | |
use URI::Escape 'uri_escape'; | |
use LWP::UserAgent; | |
use JSON 'decode_json'; | |
use Term::ReadLine; | |
my $ua = LWP::UserAgent->new(agent => "Dan the shell"); | |
&main;exit; | |