Skip to content

Instantly share code, notes, and snippets.

View gist:77891
// ==UserScript==
// @name GlitchMonkey
// @namespace http://d.hatena.ne.jp/youpy/
// @include *
// ==/UserScript==
var Corruptions = {
'image/jpeg': function() {
return this.replace(/0/g, Math.floor(Math.random() * 10));
},
View gist:95713
# $Id: Error.pm,v 1.1.2.1 2004/04/20 20:09:48 pajas Exp $
#
# This is free software, you may use it and distribute it under the same terms as
# Perl itself.
#
# Copyright 2001-2003 AxKit.com Ltd., 2002-2006 Christian Glahn, 2006-2009 Petr Pajas
#
#
package XML::LibXML::Error;
View gist:108217
$ dig @ns-a.pnap.net feeds.feedburner.com
; <<>> DiG 9.2.4 <<>> @ns-a.pnap.net feeds.feedburner.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17867
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
View gist:110981
package Cache::Migrate;
use strict;
use warnings;
use Carp;
use base qw(Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw(debug));
our $VERSION = "0.01";
View gist:111540
package Cache::Balancer;
use strict;
use warnings;
use Carp;
use Scalar::Util;
use base qw(Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw(strict rules default debug));
View gist:123579
package Coro::Mysql::DBI;
use strict;
use warnings;
use DBI;
use Coro;
use Coro::Mysql;
use Hash::FieldHash qw(:all);
@mala
mala / gist:125699
Created Jun 8, 2009
auto html escape in TT
View gist:125699
#!/usr/local/bin/perl
use strict;
use Template;
package HTMLString;
use strict;
use warnings;
use overload '""' => \&as_string;
use overload "." => \&concat;
View gist:139283
<html>
<head>
<title>パスワードをマスクしないでパスワード保存も有効にする</title>
<script type="text/javascript">
function form_submit(event) {
var self = this;
if (this.__submit_by_js) return;
this.elements.password.type='password';
setTimeout(function() {
self.__submit_by_js = true;
View gist:142579
sub _task {
my $self = shift;
my $coro_exit = 0;
my $wakeme = $Coro::current;
$self->{empty_count} = 0;
$self->{fetch_count} = 0;
my $num = $self->parallel_request_num;
# create fetcher coro
$self->create_request($num);
View gist:158203
package OreOre::SQLMaker;
use strict;
use base qw(SQL::Abstract);
# $stmt = INSERT INTO table (col1, col2, col3) VALUES (?,?,?),(?,?,?)
# @bind = (val1, val2, val3, val21, val22, val23)
sub insert_multi {
my $self = shift;
my $table = shift;
You can’t perform that action at this time.