タグ

ブックマーク / blog.64p.org (17)

  • cron でうごかしているコマンドをタイムアウトさせる - tokuhirom's blog

    coreutils の timeout(1) をつかえば OK です。 http://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html softlimit -t 60 foobar という手もあるけど、CPU時間だから sleep してるとかだと死ねないという説もあるようです。

    hogem
    hogem 2012/12/31
    timeout コマンド知らなかった。simple で良い
  • YAPC::Asia 2010 おつかれさまでした! - tokuhirom's blog

    larry wall さん, obra さん, miyagawa さんという3人の豪華なメインスピーカー、東工大の綺麗で広い会場、そしてよい天気にめぐまれ、今年の YAPC も無事におわりましたね! あの会場の魅力の一つは、あの広い芝生にねっころがってみんなで話すことなので、天気がよかったのは当によかったです。今年は王将で餃子をかってきてみんなで芝生でビールをのみながらいろいろはなせておもしろかったです。 YAPC って、トークをきくのももちろんたのしいし勉強になるんだけど、いろんな人と気軽にはなしたりするっていう、そういうのも重要だよね、とおもうので、毎年芝生でだべってます。どうしてもトークだと 1対多になってしまいますので。 さて、今回は yusukebe 主催の前夜祭にはじまりましたが、ここでは僕は Amon2 のお話をさせていただきました。大枠では、WAF をつくるための道具をこ

    hogem
    hogem 2010/10/18
    ベストスピーカー賞 おめでとうございます
  • Plack-0.9945 で任意の CGI スクリプトを実行可能になっていた件 - tokuhirom's blog

    http://search.cpan.org/~miyagawa/Plack-0.9945/ これまで Plack には Plack::App::CGIBin というモジュールが付属していたが、これは Perl script の実行しかサポートしていなかった。 しかし、Plack 0.9945 をつかと、任意の CGI script を実行可能となっている。 plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "./")->to_app' -p 9099 などとすると、 #!/usr/bin/python # -*- coding: utf-8 -*- print "Content-Type: text/plain" print print "hello world." のような、普通の cgi スクリプトを実行

    hogem
    hogem 2010/08/21
    perl以外のスクリプトも実行できる すげー / "CGI を適当につくってためしたいような場合には非常に便利だとおもう。CGI をテストするためだけに Apache をたちあげるとか、馬鹿馬鹿しいことはやらなくてよくなる。"
  • Perl 5.13.2 がもたらした package NAMESPACE BLOCK 構文があたえるもの - tokuhirom's blog

    開発版の Perl 5.13.2 がリリースされたが、5.13.2 の目玉はなんといっても package NAMESPACE BLOCK 構文だろう。 use 5.13.2; use warnings; package Point { use Moose; has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); __PACKAGE__->meta->make_immutable; no Moose; }; のように、パッケージを宣言することができるようになった。 この構文は非常に大きい変化をもたらす。 1 ファイルに複数のクラスを書くことが苦でなくなる。package NAME BOCK 構文を利用する場合、BLOCK の中はインデントすることになるため、複数パッケージを1つのファイルにか

    hogem
    hogem 2010/06/25
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2009/09/16
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2009/07/31
    "mongoose はシングルバイナリの軽量 httpd"
  • about Test::More::done_testing - tokuhirom's blog

    Test::More::done_testing が導入されているわけですが、みなさんつかってますか? Test::More の 0.87_01 から導入されてる新機能なんですが 0.87_01 Sun Mar 29 09:56:52 BST 2009 New Features * done_testing() allows you to declare that you have finished running tests, and how many you ran. It is a safer no_plan and effectively replaces it.というわけで、無計画な人でも安全な感じになります。 具体的には以下のような感じ。 15:24 tokuhirom: plan の逆っていうか 15:25 tokuhirom: plan で数を書くのめんどいじゃんすか 15

    hogem
    hogem 2009/07/09
    no_planの代わりにオケツに done_testing
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2009/06/16
    "この例のように重いクエリを一個処理して、その間に他のことをやるといったことができちゃうのが Net::Drizzle のいいところですね。"
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2009/05/29
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2008/05/21
    数多あるCPANモジュールを見極める方法
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2008/01/11
  • ssb がすばらしすぎる件 - TokuLog 改め だまってコードを書けよハゲ

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • TokuLog 改め だまってコードを書けよハゲ - ケータイシミュレータなんて使ってないで Moxy 使えばいいのに

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    hogem
    hogem 2006/10/20
    コマンド使用率
  • 1