Uncategorized
Relational Algebra in Javascript
http://pdehaan.com/RAJS/
Read Full Post | Make a Comment ( None so far )Using SQLite triggers to increment a count
I want to apply tags to urls and keep a count of how many times each tag has been used. Here’s some code that does just that: use DBI; use Text::Table; my $FILENAME = ‘play.sqlite’; unlink $FILENAME; my $dsn = “dbi:SQLite:database=$FILENAME”; my $dbh = DBI->connect($dsn) or die; $dbh->do($_) or die “$DBI::errstr for $_” for split […]
Read Full Post | Make a Comment ( None so far )Extract branch to a new repo using git-format-patch
I know this should probably be done using git-filter-branch, but with format-patch, I don’t need to learn anything new. More importantly, filter-branch would give me more to forget 🙁 Given a git repo with a branch ‘find-ls’ with history like this: * 10c757c (origin/master, master) handle errors better | * 073892b (HEAD, find-ls) don’t allow […]
Read Full Post | Make a Comment ( 1 so far )Moose tips
init_arg – use alternate attribute name in new() # in package Foo has qw(bar is ro init_arg quux); … # elsewhere my $foo = Foo->new( quux => 1 ); Foo has an attribute named “bar”, but we pass “quux” to the constructor. See Moose::Manual::Attributes / Constructor parameters (init_arg) init_arg – ban setting an attribute in […]
Read Full Post | Make a Comment ( None so far )« Previous Entries Next Entries »