Skip to content

Instantly share code, notes, and snippets.

View ingydotnet's full-sized avatar

Ingy döt Net ingydotnet

View GitHub Profile
____________________________________
< hmmm no happy but -s is stoned cow >
------------------------------------
\ ^__^
\ (**)\_______
(__)\ )\/\
U ||----w |
|| ||
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}
#!/bin/sh
"false"; exec vim -S $0
:edit ToDo/Now
:vsplit ToDo/Later
:split ToDo/Soon
:wincmd _
:wincmd h
:goto 1
function fetchTiddler(key) {
var tiddler;
callFetcher(key, function(t) { tiddler = t });
while (not tiddler) {
setTimeout(function() {}, 100);
}
return tiddler;
}
package Googler;
use 5.008003;
use Mouse;
extends 'Cog::App';
our $VERSION = '0.01';
use constant webapp_class => 'Googler::WebApp';
package Googler::WebApp;
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;
@ingydotnet
ingydotnet / gist:901455
Created April 4, 2011 10:38
mapping branch to describe info
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
ingy@thinkingy:~$ perl -MJSON -MYAML -e 'local$/;print YAML::Dump(JSON->new->decode(<>))'
{
"a": [1,2],
"b": "Hi"
}
---
a:
- 1
- 2
b: Hi
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
use constant true => ( is => 'rw', default => sub {1});
use constant false => ( is => 'rw', default => sub {0});
has option1 => true;
has option2 => false;