Skip to content

Instantly share code, notes, and snippets.

$.fn.promulgate = function() {
// this != the function!!
this.data = ':<'; # no
}
jQuery is all like $.fn.promulgate.apply(something else)
#!/usr/bin/perl
use strict;
use warnings;
use Opt::Imistic;
use Data::Dumper;
print Dumper (\%Opt::Imistic::opts);
@Altreus
Altreus / gist:723399
Created December 1, 2010 12:06
Doing a form, very basic
We couldn’t find that file to show.
@Altreus
Altreus / anag.pl
Created October 21, 2010 16:07
anag.pl word /path/to/dict - find (simple) anagrams
open$h,pop;$s=[sort pop=~/./g];$s~~[sort/./g]&&print for<$h>
sub head_data {
my $self = shift;
my $data = $self->next::method();
$data->{date_of_last_entry}
= sprintf('%d-%02d-%02dT%02d:%02d:%02d',
@{$self->{entries}[-1]}{qw(yr mo_num da hr min)}, 0);
return $data;
}
<?
function replace_h($matches) {
print_r($matches); die;
return $matches[1] . "\n" . str_repeat('-', length($matches[1]));
}
function replace_a($matches) {
return $matches[2] . " (" . $matches[1] . ") ";
}