Skip to content

Instantly share code, notes, and snippets.

@mash
mash / index.tx
Created December 14, 2011 05:17
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
</head>
<body>
<script>
$( function() {
$.getScript("http://platform.twitter.com/widgets.js", function(){
#!/usr/bin/env perl
use strict;
use warnings;
use Filesys::Notify::Simple;
use Path::Class;
use File::Copy;
use File::Temp qw/tempfile/;
use MIME::Base64;
use Growl::Any;
# 絵文字キーボードの、各カテゴリーについて、全ページの絵文字を入力してサーバで受け取ってダンプした
各ページのレイアウトに対応して以下に表示した
before: utf8::decode(Ark::Plugin::Encoding::Unicode) -> sprintf("%#x", ord($_))
after: utf8::decode(Ark::Plugin::Encoding::Unicode) -> encode('utf8') -> decode('x-utf8-e4u-unicode') -> encode('x-utf8-e4u-softbank3g') -> decode('utf8') -> sprintf("%#x", ord($_))
Encode::JP::Emoji version 0.60
!!!国旗の最後が抜けてる!!!
use strict;
use warnings;
use Amon2::Lite;
use Path::Class;
my $usage = "\nusage: PERL_ENTERPRISE_APP_NAME=<app name> PERL_ENTERPRISE_DIST_URL=http://example.com:5000/ plackup ".__FILE__."\n";
my $app_name = $ENV{ PERL_ENTERPRISE_APP_NAME };
my $url = $ENV{ PERL_ENTERPRISE_DIST_URL };
$app_name && $url
#!/usr/bin/env plackup
use strict;
use warnings;
use Amon2::Lite;
use Encode 'encode_utf8';
use Text::Markdown 'markdown';
use Path::Class;
my $file = $ENV{ MARKDOWN_FILE }
#!/usr/bin/env perl
use strict;
use warnings;
use Irssi;
use Config::Pit;
use Furl;
use vars qw($VERSION %IRSSI);
$VERSION = "0.1";
#!/usr/bin/env perl
use strict;
use warnings;
use Time::HiRes qw/time sleep/;
use Test::TCP qw/empty_port/;
use ZeroMQ qw/:all/;
my $server = Test::TCP->new(
code => sub {
my $port = shift;
#!/usr/bin/env perl
use strict;
use warnings;
use Coro;
use Coro::Semaphore;
use FurlX::Coro;
use Time::HiRes qw/time/;
use List::Util qw/min max sum/;
use Getopt::Long;
#!/usr/bin/env perl
use strict;
use warnings;
use Term::ANSIColor;
use Getopt::Long;
my $verbose;
my $result = GetOptions( "verbose" => \$verbose );
my $long_response_time = shift @ARGV;
@mash
mash / editor.js.patch
Created June 10, 2011 09:42
codemirror editor.js fix for ime mode
diff --git a/js/editor.js b/js/editor.js
index 4475579..caed9c9 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -755,7 +755,7 @@ var Editor = (function(){
return;
}
- var code = event.keyCode;
+ var code = this.lastKeyDownCode = event.keyCode;