Skip to content

Instantly share code, notes, and snippets.

View kan's full-sized avatar

Kan Fushihara kan

View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
{
package Foo;
use Mouse;
has 'foo' => ( is => 'rw', isa => 'Str', lazy_build => 1 );
To git@github.com:kan/xircd.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'git@github.com:kan/xircd.git'
@kan
kan / tmt.vim
Created December 2, 2009 10:21
" Vim syntax file
" Language: tmt
" Maintainer: Kan Fushihara
" Installation:
" To automatilcally load this file when a .rhtml file is opened, add the
" following lines to ~/.vim/filetype.vim:
"
" augroup filetypedetect
" au! BufRead,BufNewFile *.tmt setfiletype tmt
" augroup END
HTML parser error : htmlParseEntityRef: no name
p class="nico-description">【記録】36:42.63【プレイヤー】A.J.(Atma) &
^
<p class="nico-thumbnail"><img alt="【初音ミク】文学少年の憂鬱(Ver.2)【オリジナル】" src="http://tn-skr4.smilevideo.jp/smile?i=9340347" width="94" height="70" border="0"/></p>
<p class="nico-description">ナノウと申します。皆さんから頂いた名前はほえほえPです(*_ _)今回は完全に恋愛じゃない歌です!iTunes storeにて発売中のミニアルバム「星を掴もうとした緑髪少女」の収録曲を、若干リアレンジ・バランス取り直しetc.を施しました。動画は前回(sm8098201)に引き続きオサレPさんです! → mylist/9862797■日刊VOCALOIDランキング、記念すべき#700で一位でしたあああああありがとう!!!→sm9348650▲ヴォーカル抜きの音源あげました↓http://piapro.jp/my_page/?view=content&nir580【過去作品】→mylist/9634824【うp主ブログ】→http://ameblo.jp/getsumen-hoehoep/【mixiコミュ】→http://mixi.jp/view_community.pl?id=4113274</p>
<p class="nico-info"><small><strong class="nico-info-number">40,808</strong>pts.|<strong class="nico-info-length">6:53</strong>|<strong class="nico-info-date">2010年01月10日 00:11:50</strong> 投稿<br/><strong>合計</strong> 再生:<strong class="nico-inf
Benchmark: timing 20 iterations of data_recursive, data_visitor...
data_recursive: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)
data_visitor: 1 wallclock secs ( 0.19 usr + 0.29 sys = 0.48 CPU) @ 41.67/s (n=20)
Rate data_visitor data_recursive
data_visitor 41.7/s -- -100%
data_recursive 20000000000000000/s 48000000000000000% --
cat ./bench.pl
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Filesys::Notify::Simple;
use Flickr::Upload;
my $watcher = Filesys::Notify::Simple->new( [ $ARGV[0] ] );
my $ua = Flickr::Upload->new(
package MoFedge::Mail;
use strict;
use warnings;
use base qw/MoFedge Class::Accessor::Fast Class::Data::Inheritable/;
use MIME::Lite::TT::Japanese;
use File::Slurp;
use Template;
use Carp;
use Template::Provider::Encoding;
Bacall
Ball
Callaghan
Callahan
Callao
Callas
Callie
Calliope
Callisto
Caracalla
/usr/bin/perl "-Iinc" /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap xs/Text-Xslate.xs > xs/Text-Xslate.x
sc && mv xs/Text-Xslate.xsc xs/Text-Xslate.c
cc -c "-I." "-I." -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -Wall -g -O2 -DVERSION=\"0.1048\" -DXS_VERSION=\"0.1048\" -
o xs/Text-Xslate.o -fPIC "-I/usr/lib/perl/5.8/CORE" -DUSE_PPPORT xs/Text-Xslate.c
In file included from Text-Xslate.xs:21:
./xslate_ops.h: In function 'tx_init_ops':
./xslate_ops.h:211: warning: implicit declaration of function 'hv_stores'
In file included from Text-Xslate.xs:137:
./xs/xslate_opcode.inc: In function 'TXCODE_concat':
sub _normalize {
my $value = shift;
if ( $value =~ /^([-+]?)(\d+)\.(\d+)\.([0-9.]+)$/ ) {
my $degree = int($2) + int($3) / 60 + $4 / 3600;
$degree *= -1 if $1 && $1 eq '-';
return $degree;
}
else {
return $value;