Skip to content

Instantly share code, notes, and snippets.

View cho45's full-sized avatar

Satoh, Hiroh cho45

View GitHub Profile
@cho45
cho45 / ls
Last active August 29, 2015 13:57
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin qw($Bin);
use lib "$Bin/../lib";
use Teng::Schema::Dumper;
use String::Random qw(random_regex);
use Path::Class;;
my $file = shift or die "require sql file";
use Mouse::Meta::Class;
use JSON::XS;
sub TO_JSON {
my ($self) = @_;
my $klass = +Mouse::Meta::Class->initialize(ref $self);
+{
map {
my $key = $_;
my $val = $self->{$key};
if (foo) {
...;
} else
if (bar) {
...;
} else
if (baz) {
...;
} else {
...;
@cho45
cho45 / yukkuri.txt
Created July 24, 2008 05:23 — forked from motemen/yukkuri.txt
ゆっくりしていってね!!!
   _,,....,,_  _人人人人人人人人人人人人人人人_
-''":::::::::::::`''>  ゆっくりした結果がこれだよ!!! <
ヽ::::::::::::::::::::: ̄^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄
 |::::::;ノ´ ̄\:::::::::::\_,. -‐ァ     __   _____   ______
 |::::ノ   ヽ、ヽr-r'"´  (.__    ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、
_,.!イ_  _,.ヘーァ'二ハ二ヽ、へ,_7   'r ´          ヽ、ン、
::::::rー''7コ-‐'"´    ;  ', `ヽ/`7 ,'==─-      -─==', i
r-'ァ'"´/  /! ハ  ハ  !  iヾ_ノ i イ iゝ、イ人レ/_ルヽイ i |
!イ´ ,' | /__,.!/ V 、!__ハ  ,' ,ゝ レリイi (ヒ_]     ヒ_ン ).| .|、i .||
`!  !/レi' (ヒ_]     ヒ_ン レ'i ノ   !Y!""  ,___,   "" 「 !ノ i |
              __   _____   ______    ,'´ ̄ ̄ ̄ ̄ ̄ヽ.
             ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、   | そ .お ご お |
             'r ´          ヽ、ン、 | れ .風 飯 帰.|
            ,'==─-      -─==', i  | と 呂 に な |
_|\∧∧/|_   i イ iゝ、イ人レ/_ルヽイ i | | も に す  さ |
\       /   レリイi (ヒ_]     ヒ_ン ).| .|、i .|| | ・  す る  い.|
<    じ   >    !Y!""  ,___,   "" 「 !ノ i | | ・  る ? .ア |
/       \   L.',.   ヽ _ン    L」 ノ| .| | ・  ?    ナ |
 ̄|/∨∨\| ̄    | ||ヽ、       ,イ| ||イ| /  |        タ |
             レ ル` ー--─ ´ルレ レ´  ヽ、_____ノ
   _,,....,,_  _人人人人人人人人人人人人人人人_
-''":::::::::::::`''>   はやく帰ってね!!!      <
ヽ::::::::::::::::::::: ̄^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄
 |::::::;ノ´ ̄\:::::::::::\_,. -‐ァ     __   _____   ______
 |::::ノ   ヽ、ヽr-r'"´  (.__    ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、
_,.!イ_  _,.ヘーァ'二ハ二ヽ、へ,_7   'r ´          ヽ、ン、
::::::rー''7コ-‐'"´    ;  ', `ヽ/`7 ,'==─-      -─==', i
r-'ァ'"´/  /! ハ  ハ  !  iヾ_ノ i イ iゝ、イ人レ/_ルヽイ i |
!イ´ ,' | /__,.!/ V 、!__ハ  ,' ,ゝ レリイi (ヒ_]     ヒ_ン ).| .|、i .||
`!  !/レi' (ヒ_]     ヒ_ン レ'i ノ   !Y!""  ,___,   "" 「 !ノ i |
    _,,....,,_  _人人人人人人人人人人人人人人人_
 -''":::::::::::::`''>   ゆっくりしていってね!!!   <
 ヽ::::::::::::::::::::: ̄^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄
  |::::::;ノ´ ̄\:::::::::::\_,. -‐ァ     __   _____   ______
  |::::ノ   ヽ、ヽr-r'"´  (.__    ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、
 _,.!イ_  _,.ヘーァ'二ハ二ヽ、へ,_7   'r ´          ヽ、ン、
 ::::::rー''7コ-‐'"´    ;  ', `ヽ/`7 ,'==─-      -─==', i
 r-'ァ'"´/  /! ハ  ハ  !  iヾ_ノ i イ iゝ、イ人レ/_ルヽイ i |
 !イ´ ,' | /__,.!/ V 、!__ハ  ,' ,ゝ レリイi (ヒ_]     ヒ_ン ).| .|、i .||
 `!  !/レi' (ヒ_]     ヒ_ン レ'i ノ   !Y!""  ,___,   "" 「 !ノ i |
@cho45
cho45 / keyscreen.rb
Last active August 29, 2015 14:05
一度起動したあと、「システム環境設定」→「セキュリティとプライバシー」→「アクセシビリティ」で macruby を許可する必要あり
#!macruby
framework "Cocoa"
class MainView < NSView
def init
super
@log = ""
end
// ==UserScript==
// @name Last.fm unlocalize
// @namespace http://lowreal.net/
// @include http://www.lastfm.jp/*
// ==/UserScript==
location.href = "http://www.last.fm/" + location.pathname + "?setlang=en";