Skip to content

Instantly share code, notes, and snippets.

View cho45's full-sized avatar

Satoh, Hiroh cho45

View GitHub Profile
@cho45
cho45 / ldr list
Created August 15, 2008 16:38
選択したフィードの link と title をタブ区切りで
// http://reader.livedoor.com/share/
// 選択したフィードの link と title を OPML で
// Firebug で実行
var opml =
<opml version="1.0">
<head>
<title>from ldr share</title>
</head>
<body>
@cho45
cho45 / new screen with cd
Created August 21, 2008 16:17
new screen window with cd
# 新しく screen window をつくり、カレントディレクトリを実行元のディレクトリに
function n () {
screen -X eval "chdir $PWD" "screen" "chdir"
}
#!js
Object.prototype.p = function () {
print(uneval(this));
return this;
};
function merge (a, b) {
var ret = new Array(a.length + b.length);
a = a.concat(Infinity); // clone the array and append sentry
$X(".//a[@class='username']/img[@title]").forEach(function (e) {
e.parentNode.appendChild(document.createTextNode(" [id:" + e.title + "]"));
});
@cho45
cho45 / erinnnotice.rb
Created September 15, 2008 13:27
エリン時間予告
#!/usr/bin/env ruby
require "rubygems"
require "snarl"
def message(str)
Snarl.show_message("mabinogi", str, nil, 10) # 日本語で最後の1文字がおかしい。snarl sucks
end
message "エリン時間予告を起動しました。"
@cho45
cho45 / エロゲといえば
Created September 27, 2008 17:58
エロゲといえば
CROSS†CHANNEL
果てしなく青いこの空の下で…。
明日の君と逢うために
ゆのはな
CARNIVAL
グリーングリーン
ユメミルクスリ
そして明日の世界より─
桜華
カタハネ
/* UCJS Loader
* cho45, 2007-01-24 (Add menuitem for reloading)
* nanto_vi (TOYAMA Nao), 2006-12-20
*
* Automatically includes all files ending in .uc.js
* from the profile's chrome folder
*
* Original Author: zeniko
* Original Extension: Sub-Script Loader (a user script for userChrome.js)
* <http://forums.mozillazine.org/viewtopic.php?t=397735#2169699>
@cho45
cho45 / fetch-video.pl
Created November 23, 2008 18:21
時報うぜぇwwwww
#!/usr/bin/perl
# original: http://search.cpan.org/src/MIYAGAWA/WWW-NicoVideo-Download-0.01/eg/fetch-video.pl
use strict;
use WWW::NicoVideo::Download;
use Term::ProgressBar;
use Config::Pit;
use URI;
use HTML::TreeBuilder::XPath;
use Perl6::Say;
// 正規分布の累積分布関数生成関数
function make_normal_distribution_function (variance, average) {
var a = Math.sqrt(variance) * Math.sqrt(2);
var erf = function (x) {
return ((x < 0.0) ? -1 : 1) * Math.pow(1.0 - Math.exp(-1.27323954 * x * x), 0.5);
};
return function (x) {
return (1 + erf((x - average) / a)) / 2;
};
data:audio/ogg;base64,
T2dnUwACAAAAAAAAAAB9jS1hAAAAAEE8b8gBHgF2b3JiaXMAAAAAAkSsAAAA
AAAAAHECAAAAAAC4AU9nZ1MAAAAAAAAAAAAAfY0tYQEAAABHP9bQES3/////
////////////////A3ZvcmJpcx0AAABYaXBoLk9yZyBsaWJWb3JiaXMgSSAy
MDA3MDYyMgAAAAABBXZvcmJpcylCQ1YBAAgAAAAxTCDFgNCQVQAAEAAAYCQp
DpNmSSmllKEoeZiUSEkppZTFMImYlInFGGOMMcYYY4wxxhhjjCA0ZBUAAAQA
gCgJjqPmSWrOOWcYJ45yoDlpTjinIAeKUeA5CcL1JmNuprSma27OKSUIDVkF
AAACAEBIIYUUUkghhRRiiCGGGGKIIYcccsghp5xyCiqooIIKMsggg0wy6aST
TjrpqKOOOuootNBCCy200kpMMdVWY669Bl18c84555xzzjnnnHPOCUJDVgEA
IAAABEIGGWQQQgghhRRSiCmmmHIKMsiA0JBVAAAgAIAAAAAAR5EUSbEUy7Ec