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 bash | |
# Install any build dependencies needed for curl | |
sudo apt-get build-dep curl | |
# Get latest (as of Feb 25, 2016) libcurl | |
mkdir ~/curl | |
cd ~/curl | |
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2 | |
tar -xvjf curl-7.50.2.tar.bz2 |
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
package Try; | |
use Carp; | |
$Carp::Internal{+__PACKAGE__}++; | |
*main::try = \&try; | |
sub try (&;%) { } | |
1; |
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 sudo perl | |
use utf8; | |
use strict; | |
use warnings; | |
use lib lib => glob 'modules/*/lib'; | |
use Net::DNS::Nameserver; | |
use Path::Class; | |
use Perl6::Say; |
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
diff --git a/lib/Number/Phone/JP/Table.pm b/lib/Number/Phone/JP/Table.pm | |
index ddca7c4..9e26380 100644 | |
--- a/lib/Number/Phone/JP/Table.pm | |
+++ b/lib/Number/Phone/JP/Table.pm | |
@@ -5,7 +5,6 @@ use warnings; | |
use base qw(Exporter); | |
our $VERSION = '0.20110401'; | |
-our @EXPORT = qw(%TEL_TABLE); | |
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
# wget --header='Accept-Encoding: gzip' -O root.bin.gz http://bellard.org/jslinux/root.bin | |
# gunzip root.bin.gz | |
# mkdir mnt | |
# mkdir files | |
# sudo mount -t ext2 -o loop root.bin mnt | |
# dd if=/dev/zero of=files/root.bin bs=1k count=4096 | |
# sudo mke2fs -m 0 -i 2000 files/root.bin | |
# mkdir mnt2 | |
# sudo mount -t ext2 -o loop files/root.bin mnt2 | |
# sudo cp -dpR mnt/* mnt2/ |
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 -w | |
use strict; | |
use IPC::Open3; | |
use Symbol qw(gensym); | |
my($r, $w, $e) = (gensym, gensym, gensym); | |
my $pid = open3($r, $w, $e, "perl", "-e", | |
'print $_ qq{x\n} x (1024 * 1024) for \*STDOUT, \*STDERR'); |
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
月曜: @九段会館 | |
火曜: @高島屋&マルゴ&どっか | |
水曜: @どっか | |
木曜: @うっちゃん | |
金曜: @しぶや | |
土曜: @バーミヤンしたけどアルコール無し | |
日曜: @パスタ |
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 5.12.0; | |
use Pod::Usage; | |
use Config::Pit; | |
use Path::Class; | |
use Data::Dumper; | |
use GDBM_File; | |
use autodie; |
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 File::Basename qw(basename); | |
sub get($); | |
sub mirror($$); | |
sub untar; | |
if (eval { require LWP::Simple }) { | |
*get = \&LWP::Simple::get; |
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
# Newbie programmer | |
sub factorial { | |
my $x = shift; | |
if ($x == 0) { | |
return 1; | |
} else { | |
return $x * factorial($x - 1); | |
} | |
} | |
print factorial(6); |
NewerOlder