Skip to content

Instantly share code, notes, and snippets.

// ==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));
},
# $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;
$ 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:
package Cache::Migrate;
use strict;
use warnings;
use Carp;
use base qw(Class::Accessor::Fast);
__PACKAGE__->mk_accessors(qw(debug));
our $VERSION = "0.01";
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));
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 June 8, 2009 08:15
auto html escape in TT
#!/usr/local/bin/perl
use strict;
use Template;
package HTMLString;
use strict;
use warnings;
use overload '""' => \&as_string;
use overload "." => \&concat;
<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;
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);
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;