This file contains hidden or 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
____________________________________ | |
< hmmm no happy but -s is stoned cow > | |
------------------------------------ | |
\ ^__^ | |
\ (**)\_______ | |
(__)\ )\/\ | |
U ||----w | | |
|| || |
This file contains hidden or 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
j) {"&": "good", "a": "b"} | |
y) &good {a: b} | |
j) {"&good": [1,2,3], "*good": "b"} | |
y) {[1, 2, 3]: b} | |
j) {"&undecided": "a", "*undecided": "b"} | |
y) {a: b} | |
This file contains hidden or 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/sh | |
"false"; exec vim -S $0 | |
:edit ToDo/Now | |
:vsplit ToDo/Later | |
:split ToDo/Soon | |
:wincmd _ | |
:wincmd h | |
:goto 1 |
This file contains hidden or 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
function fetchTiddler(key) { | |
var tiddler; | |
callFetcher(key, function(t) { tiddler = t }); | |
while (not tiddler) { | |
setTimeout(function() {}, 100); | |
} | |
return tiddler; | |
} |
This file contains hidden or 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 Googler; | |
use 5.008003; | |
use Mouse; | |
extends 'Cog::App'; | |
our $VERSION = '0.01'; | |
use constant webapp_class => 'Googler::WebApp'; | |
package Googler::WebApp; |
This file contains hidden or 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
enable sub { | |
my $app = shift; | |
return sub { | |
my $env = shift; | |
my $res = $app->($env); | |
my $control = $env->{PATH_INFO} =~ /\.(css|js)$/ | |
? 'max-age=42' | |
: 'no-cache'; | |
Plack::Util::header_set($res->[1], 'Cache-Control', $control); | |
return $res; |
This file contains hidden or 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
blead - v5.13.11-368-gc2c97af | |
GitLive-blead - GitLive-blead | |
GitLive-maint-5.004 - GitLive-maint-5.004 | |
GitLive-maint-5.005 - GitLive-maint-5.005 | |
GitLive-maint-5.10 - GitLive-maint-5.10 | |
GitLive-maint-5.6 - GitLive-maint-5.6 | |
GitLive-maint-5.8 - GitLive-maint-5.8 | |
code-review/2009-07-22 - code-review/2009-07-22 | |
perl-1.0 - | |
perl-1.0.15 - perl-1.0.15 |
This file contains hidden or 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
ingy@thinkingy:~$ perl -MJSON -MYAML -e 'local$/;print YAML::Dump(JSON->new->decode(<>))' | |
{ | |
"a": [1,2], | |
"b": "Hi" | |
} | |
--- | |
a: | |
- 1 | |
- 2 | |
b: Hi |
This file contains hidden or 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 module authors are used to doing things with make: | |
perl Makefile.PL # Makes a makefile | |
make # Build the preinstall | |
make test # Run the tests | |
make install # Install everything | |
make dist # Make a CPAN distibution package | |
make upload # Send the dist to CPAN | |
make clean # Reset | |
This file contains hidden or 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 constant true => ( is => 'rw', default => sub {1}); | |
use constant false => ( is => 'rw', default => sub {0}); | |
has option1 => true; | |
has option2 => false; |