Skip to content

Instantly share code, notes, and snippets.

@iizukanao
iizukanao / hang.js
Last active August 29, 2015 14:05
setTimeout issues on Node v0.10.30
var counter = 0;
function queueNext() {
if (++counter === 100) {
return;
}
console.log(counter);
setTimeout(function() {
queueNext();
}, 12.34);
@iizukanao
iizukanao / index.html
Last active August 29, 2015 14:05
Live streaming while avoiding accumulating delay (replace YOUR_HOST with server's address)
<!doctype html>
<head>
<title>Live streaming with Strobe Media Playback</title>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, user-scalable=no">
</head>
<body>
<script src="lib/swfobject.js"></script>
<script src="lib/ParsedQueryString.js"></script>

Keybase proof

I hereby claim:

  • I am iizukanao on github.
  • I am iizukanao (https://keybase.io/iizukanao) on keybase.
  • I have a public key whose fingerprint is 5BDB 1C5A CD96 E31E C52B 6D44 2F55 F78B 6D3C 88E3

To claim this, I am signing this object:

use Test::Base;
use File::Temp qw/tempdir/;
plan 'no_plan';
BEGIN { $ENV{ARK_HOME} = tempdir( CLEANUP => 1 ) }
{
package T::Models;
use Ark::Models '-base';
@iizukanao
iizukanao / Object-Container-0.11-Exporter-AutoClean.patch
Created October 20, 2010 12:20
tar zxvf Object-Container-0.11.tar.gz && cd Object-Container-0.11 && patch -p1 < this.patch
diff -Nur Object-Container-0.11.orig/Makefile.PL Object-Container-0.11/Makefile.PL
--- Object-Container-0.11.orig/Makefile.PL 2010-10-05 18:54:58.000000000 +0900
+++ Object-Container-0.11/Makefile.PL 2010-10-20 20:21:20.000000000 +0900
@@ -5,6 +5,7 @@
requires 'Carp';
requires 'Class::Accessor::Fast';
requires 'parent';
+requires 'B::Hooks::EndOfScope';
recommends 'Exporter::AutoClean';
@iizukanao
iizukanao / Error
Created January 31, 2011 09:09
Error message that I encountered while using app
DBI Exception: DBD::mysql::st execute failed: Duplicate entry &#39;(null)&#39; for key &#39;apns_token&#39; [for Statement &quot;INSERT INTO user_apns ( apns_token, created_date, user) VALUES ( ?, ?, ? )&quot; with ParamValues: 0=&quot;(null)&quot;, 1=&#39;2011-01-31 18:02:49&#39;, 2=&#39;407&#39;] at /home/homepage/perl5/lib/perl5/DBIx/Class/Schema.pm line 1026
..続く
@iizukanao
iizukanao / app.psgi
Created February 14, 2011 12:51 — forked from typester/app.psgi
#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';
use MyApp;
my $app = MyApp->new;
$app->setup;
@iizukanao
iizukanao / .ackrc
Created June 6, 2011 13:21
let ack search *.mt, *.txt, and *.coffee
--type-set
coffeescript=.coffee
--type-add
html=.mt,text=.txt,coffeescript=.coffee
@iizukanao
iizukanao / growlnotify
Created July 15, 2011 09:59
growlnotify over UDP
#!/usr/bin/env perl
use strict;
use warnings;
use Net::GrowlClient;
use Getopt::Long::Descriptive;
my ($opt, $usage) = describe_options(
`basename $0`." %o",
[ "name|n:s", "Set the name of the application that sends the notification", {default => "growlnotify"} ],
[ "priority|p:i", "Specify an int or named key", {default => 0}, ],
fib = (n) ->
throw new Error "n must be positive integer" if n < 0
switch n
when 0 then 0
when 1 then 1
else
fib(n-1) + fib(n-2)