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
# $ tweet Hi mom! | |
# | |
# Put this in ~/.bashrc or wherever. | |
# If it doesn't work, make sure your ~/.netrc is right | |
# | |
# (Thanks to @anildigital and @grundprinzip for curl-fu) | |
function tweet { | |
curl -n -d status="$*" https://twitter.com/statuses/update.xml --insecure &> /dev/null | |
echo "tweet'd" |
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
hello.txt: hello.as | |
as -o hello.o hello.as | |
ld -o hello.txt hello.o |
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
#!/usr/bin/perl | |
use strict; | |
use PadWalker 'peek_my'; | |
my $x = 1; | |
sub { | |
sub { $x }; | |
(sub { peek_my(0) })->(); | |
}->(); |
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); |
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
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
月曜: @九段会館 | |
火曜: @高島屋&マルゴ&どっか | |
水曜: @どっか | |
木曜: @うっちゃん | |
金曜: @しぶや | |
土曜: @バーミヤンしたけどアルコール無し | |
日曜: @パスタ |
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'); |
OlderNewer