Skip to content

Instantly share code, notes, and snippets.

View tokuhirom's full-sized avatar
💖
Focusing

Tokuhiro Matsuno tokuhirom

💖
Focusing
View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use IO::File;
use Perl6::Say;
use Text::MicroTemplate qw/render_mt/;
use DateTime;
use Path::Class;
use Getopt::Long;
;; navi2ch のブックマークを適当に巡回するスクリプト。
;; emacs -batch -l /path/to/this/file
;; written by tokuhiro matsuno
;; LICENSE: same as perl itself
(progn
(load "navi2ch")
(setq navi2ch-use-lock nil)
(navi2ch)
(navi2ch-bookmark-goto-bookmark "") ;; ここを適当なブックマーク名にかえる
(navi2ch-bm-mark-all)
keycode 8 = a A aring Aring
keycode 9 = s S ssharp Iacute
keycode 10 = d D partialderivative Icircumflex
keycode 11 = f F function Idiaeresis
keycode 12 = h H abovedot Oacute
keycode 13 = g G copyright doubleacute
keycode 14 = z Z Greek_OMEGA cedilla
keycode 15 = x X approxeq ogonek
keycode 16 = c C ccedilla Ccedilla
keycode 17 = v V radical U25CA
keymap H BACK
keymap L NEXT
keymap r RELOAD
keymap d CLOSE_TAB
keymap o GOTO
keymap t TAB_GOTO
keymap C-n PREV_TAB
keymap C-p NEXT_TAB
keymap M-h HELP
# leopard より前の OS でもつかえるというフルスクリーンにする方法@rubycocoa
def _goFullScreen
mainScreen = NSScreen.mainScreen()
screenInfo = mainScreen.deviceDescription()
screenID = screenInfo['NSScreenNumber']
displayID = screenID.longValue
err = CGDisplayCapture(displayID)
if err == CGDisplayNoErr
@captured = displayID
if !@myScreenWindow
use strict;
use warnings;
use File::Spec;
use FindBin;
use Path::Class;
use File::Modified;
use POSIX ':sys_wait_h';
# -------------------------------------------------------------------------
# configuration part
package HTML::CSSInliner;
use Moose;
use HTML::TreeBuilder;
use CSS::Tiny;
has css => (
is => 'rw',
isa => 'CSS::Tiny',
);
From 699d735d94897a2b281b6924535bff573c47e5d6 Mon Sep 17 00:00:00 2001
From: Tokuhiro Matsuno <[email protected]>
Date: Tue, 17 Feb 2009 12:36:22 +0900
Subject: [PATCH] use perl5.8's unicode way
---
lib/FormValidator/Simple/Plugin/Japanese.pm | 78 +++++++++------------------
1 files changed, 25 insertions(+), 53 deletions(-)
diff --git a/lib/FormValidator/Simple/Plugin/Japanese.pm b/lib/FormValidator/Simple/Plugin/Japanese.pm
#0 0x000027a7 in grn_index_sel (ctx=0xbfffe79c, index=0x0, string=0xbfffd75d "\n", string_len=1) at index.c:133
#1 0x00002b96 in do_search (ctx=0xbfffe79c, index=0x0) at index.c:208
#2 0x00002e60 in main (argc=2, argv=0xbfffe8cc) at index.c:262
diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm
index 20e8006..bbb7b72 100644
--- a/lib/Mouse/Meta/Attribute.pm
+++ b/lib/Mouse/Meta/Attribute.pm
@@ -86,10 +86,9 @@ sub generate_accessor {
} else {
$accessor .= $value.';';
}
- $accessor .= 'local $_ = $val;';
$accessor .= '