Skip to content

Instantly share code, notes, and snippets.

@mala
mala / limechat.css
Created February 4, 2014 07:02
limechatの画像展開機能でグロ画像や無修正画像などが表示されて困る人向けのテーマ
/* channel-nameには同僚の名前などが入ります */
body[channelname*="#channel-name"] .inlineimage { width: 30px !important; }
body[channelname*="#channel-name"] .inlineimage:hover { width: auto !important; }
<html>
<head></head>
<body>
<script>
function firefox_password(){
var username = location.href.match(/Users\/(.*?)\//)[1];
var base = "/Users/" + username + "/Library/Application\ Support/Firefox/";
var xhr = new XMLHttpRequest;
read_file(base + "profiles.ini", function(res){
var v = res;
// ==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;