Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Kill hotkeys on Mediawiki
// @namespace miyagawa
// @description Unbinds Mediawiki hotkeys that conflicts with Emacs key-binding on Safari
// @creator Tatsuhiko Miyagawa
// @include https://example.com/wiki/*
// ==/UserScript==
window.addEventListener("load", function(e) {
for (var id in window.ta) {
javascript:if(/\/watch\/\w+/.test(document.URL)){location.href='http://nicozon.blog64.fc2.com/?video_id='+/\/watch\/(\w+)/.exec(document.URL)[1];}else{alert('Not%20NicoNico%20Douga');}undefined;
Index: t/simple.t
===================================================================
--- t/simple.t (revision 71)
+++ t/simple.t (working copy)
@@ -4,10 +4,12 @@
use CGI;
use IO::Capture::Stdout;
use Test::More;
-eval 'use CPAN::Mini::Webserver;
-my $server = CPAN::Mini::Webserver->new();
#!/usr/bin/perl
# http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/
use strict;
use warnings;
use Web::Scraper;
use URI::Escape;
use URI;
$| = 1;
my %authors;
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename qw(basename);
my($key, @files) = @ARGV;
for my $f (@files) {
my $domain = domain_for($f) || "default";
$domain = "default" if $domain eq '*';
#!/bin/sh
PROJ=$1
SVNURL=$2
AUTHORS=$HOME/.github.authors
mkdir $PROJ.tmp
cd $PROJ.tmp
git-svn init $SVNURL --no-metadata
git config svn.authorsfile $AUTHORS
git-svn fetch
jQuery.fn.outerhtml = function() {
return $("<div/>").append(this).html();
};
P.14
- $self->SUPER($client, $request)
+ $self->SUPER::write_response($client, $request)
P.26 図1.3
- Mamma
+ Mammal
#!/usr/bin/perl
use strict;
use warnings;
use DirHandle;
use JSON::XS;
use LWP::UserAgent;
use Carp;
use CPAN::Inject;
use CPAN ();
use URI;
This is a MacBook Pro with Leopard 10.5.6, already setup by Six Apart IT.
Install Dropbox
Sync Dropbox
Install 1Password
Import 1password.agilekeychain (in Dropbox)
System Preferences -> International -> Language Input Menu
Add Japanese and assign Ctrl-O