2011年07月30日Mac mini (Mid 2011) 購入Mac mini (Mid 2011) をCTOで Core i7 2.7GHz にアップグレードして購入。 2010年02月16日NearbyブックマークレットGoogle Maps の中心地点の座標で Twitter 検索するブックマークレット 使い方:下記の「Nearby」のリンクをブックマークバーにドラッグ&ドロップ。Google Maps を表示している時に、ブックマークバーに作った「Nearby」をクリック ソース (下記を1行で) 2010年01月07日USERTrust Legacy Secure Server CAHumeia経由で「StartSSL Standard」のSSLサーバ証明書を取得したら、 中間認証局が The USERTRUST Network の USERTrust Legacy Secure Server CA となっていた。 Not Before: Nov 26 20:33:13 2009 GMT 2009年11月05日シェルスクリプト実行PHPコードシェルスクリプトをブラウザから実行するためのPHPコード。 <html>
<head>
<meta name="viewport" content="width=640">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $_SERVER['PHP_SELF'] ?></title>
</htad>
<body style="background-color:#ffffff">
<h1>php-com</h1>
<?php if ( $_SERVER['REQUEST_METHOD'] != 'POST' ) { ?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<p>
Attr1: <input type="text" name="attr1"><br>
Attr2: <input type="text" name="attr2"><br>
<input type="submit" value="Execute">
</p>
</form>
<?php } else { ?>
<pre style="border:1px solid #eee;background-color:#f8f8f8"><?php
$command = './command.sh';
$command .= " " . escapeshellarg( $_POST['attr1'] );
$command .= " " . escapeshellarg( $_POST['attr2'] );
$command .= " 2>&1";
print_r( htmlspecialchars( shell_exec( $command ) ) );
?></pre>
<?php } ?>
</body>
</html>2009年08月31日Perl の print と syswrite をベンチPerl でログメッセージをファイルへ書き出すのに、 print() と syswrite() のどちらを使うか迷ったので、参考にベンチマークを取ってみた。 ざっくりまとめると、syswrite() は、バッファリングを無効にした print() より 2割ほど速い。 2009年08月30日Snow Leopard で perl -vmbair:~ syn$ perl -v This is perl, v5.10.0 built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. 2009年08月27日TwitterにPOSTするのにJSONは要らないPerlからTwitterにポストするためにNet::Twitterを使おうと思った。 レンサバで使うのに依存関係が少ないものを使いたいので、Net::Twitter::LiteとかNet::Twitterの古いバージョンとかを物色し、PurePerlなモジュールのみでなんとか準備した。 しかし、Net::Twitterの中身を良く見てみると、“つぶやき”を投稿するだけなら、内容をURIエンコードしてPOSTするだけなので、JSONは必要としない。 POSTが成功した時の応答bodyにJSONが使われているのだが、投稿が成功したかどうかはステータスラインを参照するだけで判断出来るので、実質必要ない。 結局、LWP::UserAgentをuseするだけで目的を達してしまった。 2008年08月16日Foxmarksのjaロケール不具合対策スクリプトFoxmarksをインストールしたら設定画面でxmlパースエラーが出た。 2008年07月22日iPhone の UserAgentMozilla/5.0 (iPhone; U; CPU iPhone OS 2_0 like Mac OS X; ja-jp) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5A347 Safari/525.20 2008年03月14日YouTube API利用コードをPerlモジュール化してみた「ゆーすけべー日記: Perl から YouTube の新API を使って動画をアップロードする」で公開されていたコードをほとんどそのまま利用させてもらってモジュールを作ってみた。 ... リンク元 ... |
Search
Recent Entries
Mac mini (Mid 2011) 購入
Nearbyブックマークレット USERTrust Legacy Secure Server CA シェルスクリプト実行PHPコード Perl の print と syswrite をベンチ Snow Leopard で perl -v TwitterにPOSTするのにJSONは要らない Foxmarksのjaロケール不具合対策スクリプト iPhone の UserAgent YouTube API利用コードをPerlモジュール化してみた MacBook Air と Boot Camp まとめ Mac mini の HDD が読めなくなった MacBook Air has come POP,Flickr,Twitter xinetdの代わりにlaunchdを経由してstunnelを使う 年明けとともにLeopardに本格移行 Prismがやばい Leopard入れた Apple Wireless Keyboard を買った W-ZERO3 [es] と GPS で移動履歴をとる more...
Categories
Books/Music/Hobby
Car/Motorcycle Develop Eat/Food Mac/Apple Movie My site PC/Net Peanuts/Snoopy Trip/Meeting Unclassified
Archives
Related
About SYN (Profile)
@kihei Taste of Peanuts The World Famous Peanuts Site SYNのアンテナ SYNの日記 世界的に有名な伝言板
Links
Web Ring
|