Skip to content

Instantly share code, notes, and snippets.

View taiyoh's full-sized avatar
👶

taiyoh taiyoh

👶
View GitHub Profile
# 他のポート番号を指定する際につけてください
#port = 3128
# デバッグオプションを有効にしたいときにつけてください
#debug = 1
# プロキシサーバへつなぐ為のパラメータ。ホスト名かIPを指定してください
#domain = hogehoge.local
[www.example.com]
/path/to/remote.js = /path/to/local.js
<?php
$ary = array(1,2,3,4,5);
var_dump((true)? array_reverse($ary) : array_flip($ary));
use strict;
use warnings;
use Glib;
use Irssi;
use Config::Pit;
use WebService::ImKayac;
my $im = WebService::ImKayac->new(
<?php
$tel_reg = '/^(\d| |-|\+|\(|\))*$/';
$tel_reg2 = '/^[0-9()+\- ]*$/';
$tel = '+81 (03) 5562-9540';
foreach (array($tel_reg, $tel_reg2) as $reg) {
$start_m = microtime();
$start = time();
From 06b773719f68119491f1c84c497ea98a872d230d Mon Sep 17 00:00:00 2001
From: Taiyoh Tanaka <[email protected]>
Date: Tue, 5 Oct 2010 14:09:48 +0900
Subject: [PATCH] =?UTF-8?q?MouseX::Foreign=E5=AF=BE=E5=BF=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Taiyoh Tanaka <[email protected]>
#!/usr/bin/env perl
use common::sense;
use utf8;
use Text::MTFormatBuilder '-Declare';
print blog_export {
entry {
metadata {
#!perl -w
use strict;
use utf8;
use Encode qw/decode_utf8 encode_utf8/;
use LWP::UserAgent;
use URI;
use JSON::XS;
use URI::Escape::XS;
use HTML::TreeBuilder::XPath;
@taiyoh
taiyoh / Letter.pm
Created November 29, 2010 12:41
rewrite of Imager::DTP::Letter::draw
sub draw {
my($self) = shift;
my %o = $self->_draw_init(@_);
# recalculate bounding box
$self->_calcWidthHeight();
# draw frame - for debug
if($o{debug}){
# real body frame
$o{target}->box(
filled=>1,aa=>0,color=>'#FFAA99',
@taiyoh
taiyoh / mod_file.pl
Created December 24, 2010 10:39
modify file with no module
#!perl -w
use strict;
use utf8;
open my $f, '<', 'a.txt';
flock($f, 2);
my $data = <$f>;
chomp $data;
open $f, '+>', 'a.txt';
@taiyoh
taiyoh / NotificationSocket.as
Created February 9, 2011 09:36
汎用通知ソケットコネクション
package {
import flash.system.Security;
import flash.system.SecurityPanel;
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.Sprite;
import flash.net.Socket;
import flash.events.*;
import flash.external.ExternalInterface;
import flash.utils.setTimeout;