2008-01-01から1年間の記事一覧

embeddeds in GR

Google Reader で記事中の埋め込みコンテンツ(object/embed)を表示するには提供サイトがホワイトリスト入りしてる必要があるが,enclosure で別に指定されてる場合はこの制限が無いことが tsumami.appjet.net*1を作る課程で判明。 ただ flashvars/width/heig…

自演アフィ成立

無事報酬が出た。記念に買った本を貼り付け。 + ↑生成用に作ったbml(を手直ししたもの)。 javascript:'boopleISBNAffiLink',{id:'uuwBll80BBU',_:function(h,r,a,d,l,m){for(l='<a\40href="http://click.linksynergy.com/fs-bin/statform?id='+this.id+'&offerid=33310&bnid=2&subid=0&ifc=4&ifr=$"></a\40href="http://click.linksynergy.com/fs-bin/statform?id='+this.id+'&offerid=33310&bnid=2&subid=0&ifc=4&ifr=$">

未読数を詳しく

やってみた。 javascript:'GRDetailedTotalUnread',function(x,s,e){for(;e=x.iterateNext();)s+=+/\d+/(e.innerHTML);alert(s)}(document.evaluate('id("sub-tree")//li[contains(concat(" ",@class," ")," sub ")]//span[contains(concat(" ",@class," "),…

アフィリエイトのテスト

「自分購入分も報酬対象」とあるけどホントだろうか。

GRK

やりたいことが増えたのでコレを一から書き直した。 http://gist.github.com/36459.txt?.user.js キー指定を改善。 機能に名前。 はてブと連携。

const

.js

+function(){ print("[Doesn't compile]"); // → (error before this is printed) const x = 'hoge'; var x = 'fuga'; print(x); }(); +function(){ print("[The substitution is simply ignored]"); const x = 'hoge'; x = 'fuga'; print(x); // → hoge }()…

はてブRSSの一括登録

リニューアルでいい感じになったので少し積極的に活用してみることにした。単語と閾値の組に適当なフィード名を付けて Google Reader 用に OPML を吐く。 dic = [ Ruby: 3, Groovy: 2, xyzzy: 1, 筒井康隆: 1, 中島みゆき: 1, // ... ]; println "" new groo…

domainColorTab

Griever を Ubiquity で。 http://gist.github.com/35473 gist が対応してないのでここから導入。← 解決。たくさん開くと華やかで楽しい。

gmail

http://gist.github.com/35015 アクセスキー重要。 + email の機能を統合。

キーワードブログにねじこむ

タグがキーワードにならないことに最近気が付いた。*1どうも実際にリンクが作成されないとダメらしい。 せっかくの機能を棒に振るのは癪だが強引に単語を散りばめるのも嫌。なので一旦載ってしまえば取り下げは無いっぽいのを利用して 適当にキーワードを並…

restart

http://gist.github.com/35040 restartApp を移植しただけ。 オマケ keyconfig 用スニペット。 +function(){ const os = Components.classes['@mozilla.org/observer-service;1'] .getService(Components.interfaces.nsIObserverService); const cancelQuit …

absPath

absPath = (function(abs, spltr, rplcr){ return function absPath(path, base){ if(abs.test(path)) return path; var [root, rest] = spltr.exec(base); if(path[0] !== '/') path = '/'+ rest + path; while(path !== (path = path.replace(rplcr, '')))…

GR compaction

Google Reader Moderately Compact | Userstyles.org 記事部分の高さに100px程プラス。 + http://userstyles.org/styles/8983 から auto-resizing を拝借。 + userstyles.org に登録。Google Reader Absolutely Compact に対抗してみる。

最後まで継ぎ足す

// ==UserScript== // @name ap-to-end // @namespace http://d.hatena.ne.jp/murky-satyr // @include http* // ==/UserScript== var aph = document.getElementById('autopagerize_help'); aph && function(stop, yet){ function sc2e(){ stop || scrollTo…

GR << keybinds

// ==UserScript== // @name google-reader-keybinds // @namespace http://d.hatena.ne.jp/murky-satyr // @include http://www.google.com/reader/view/* // @include http://www.google.co.jp/reader/view/* // ==/UserScript== window.addEventListener(…

「常に手前」をトグる

#include <windows.h> #include <tchar.h> int WinMain(HINSTANCE curr, HINSTANCE prev, LPSTR args, int stat) { if(__argc < 3){ char *buff = new char[strlen(*__argv) + 32]; wsprintf(buff, "usage: %s {+|-} {title} [class]", *__argv); MessageBoxA(NULL, buff, "topmo</tchar.h></windows.h>…

tinyurl

http://gist.github.com/31335 備え付けのがダメすぎるので置き換え。 デフォでカレントページのURLを使う アライアスに対応 実行でコピー アライアスはコピペで入力するとかしないと誤爆が怖いかも知れない。*1 *1:付け直し効かないっぽいので

AutoLongURLize

http://gist.github.com/31130 LRUyniTはボツ。

lib-at0m

http://lib-at0m.appjet.net/ というのを作って http://takenatom.appjet.net/ で使った。

LRUyniT

// ==UserScript== // @name LRUyniT // @namespace http://d.hatena.ne.jp/murky-satyr // @include http://twitter.com/* // @include http://www.google.co.jp/reader/view/* // ==/UserScript== var tiny = /^http:\/\/(?:preview\.)?tinyurl\.com\/\w+/…

jamazon

amazon.co.jp (Ubiquity 0.5.4+) · GitHub 日本版 "Amazon.com"。0.5.5 推奨。 画像は初期バージョンのもの

メンテ報告

万が一使ってる人が居ないとも限らないので。 全体 スキンを意識 スタイルの決め打ち減 クラス指定増 アクセスキー ローディング画像廃止 個別 hatebu 0.12 に対応 hotentry 五分毎に更新 say twitter から名前変更 一分毎に更新 google related → grelated …

Error

Ioのせい。 - たばさの - Rubyist 出るのは 1B でも出るけど標準出力の方に吐いちゃうので実質出ないというか。 io = ['io', '-e', '-'].execute() println "Err:\n$io.err" println "Out:\n$io.in" Err: Out: Exception: argument 0 to method '-' must be …

Kanasan.js サイ読#6

.js

雨が止むのを待って出かけたため昼から参加。ヘタレすぎる。 "name" of img/applet 知らなかった。レガシーDOMって残しとく意味無さそう。 sorting algorithms Rhinoがわざわざヒープソートを実装してる*1のは SM-C からそのまま持ってきたからだろか。実装…

'0' in 0~1000

0〜1000に含まれる0をカウントする - os0x.blog for(var i=0,c='';i<1001;++i)c+=i+'';alert(c.match(/0/g).length); ふむ。とりあえず for(i=c='';i<1001;)c+=i++;alert(c.match(/0/g).length) 枝葉を落として 53B。IE/Safari を捨てるなら // ↓ match/leng…

yats w/ U.pRD + jQuery

※ yats の(もうちょいまともな)最新版は → http://gist.github.com/45590 ポイントとして、htmlからxpathで要素を引っ張ってくるには以下のようにしなければならない http://d.hatena.ne.jp/mumoshu/20081113/1226597030 Utils.parseRemoteDocument なるもの…

TCO

.n

Scalaって末尾再帰の最適化してるの? - みずぴー日記 をねまーるでまねーる。 def fact(n){ | 0 => 1 | _ => n * fact(n - 1) } fact(1000000)Process is terminated due to StackOverflowException.def fact_i(n){ def loop(m, n){ | (_, 0) => 1 | _ => lo…

filter-selection

(defunkey filter-selection #\C-\| (cmd) (interactive "*e| " :history0 'execute) (if (get-selection-type) (let ((s (selection-mark)) (e (selection-point))) (and (> s e) (rotatef s e)) (filter-region cmd s e)) (filter-region cmd))) filter-re…

custom pronouns

代名詞を自分で定義する機能が(まだ)無いので,最も使用頻度が高いと思われる noun_arb_text を弄って擬似的に実現してみる。 {Firefox Profile}/extensions/ubiquity@labs.mozilla.com/chrome/content/nlparser/en/nountypes.js --- nountypes.js 2008-10-1…

-l

で起動できる超簡易HTTPモードの概要。処理の中身は src/main/groovy/ui/Groovy(Main|SocketServer).java にある。 localhost のルートで待つ。デフォルトのポートは 1960。 -n/-p 同様リクエスト一行毎に指定したスクリプトを実行。 ファイルを指定した場合…