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 . |
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)/ |
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\ |
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 ); |
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; |
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 |
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 <[email protected]> | |
# | |
# see http://codex.gallery2.org/Gallery_Remote:Protocol | |
# | |
require 'fileutils' | |
require 'sinatra' |
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. |
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; | |