はてなキーワード: Commandとは
なんか、最近の家電もそうなんだけど、簡単に見せる事にがんばり過ぎて、かえって使いにくくなってる・・・気がする。ボタンの数は減って、見た目は優しくなったけど、やりたい事をやるためには何層もメニューを下っていかなきゃいけない。
昔の家電は、ボタンは多くて、一見してうわーて思うんだけど、1機能1ボタンで、やりたい事がすぐ出来た(と思う)。PCはいちおう使えてるけど、たくさんのボタン(キーボード)があって、CtrlとかAltとかCommandがあるから、やりたい事が一発でできるし、キーの位置も変わらないから、1度憶えた事はずっと使える。
でもタブレットとかスマホはのっぺりした1枚板で、キーとかボタンの位置と機能はアプリによって変わってしまうみたいだし、憶える事が多すぎる・・・気がする。たぶん、子供とか、若い人みたいに柔軟性がある人には向いてるんだろうけど、はっきりいって高齢者を置き去りにしてると思う・・・。
銀行のATMとか、駅の券売機とかでまごついてるおじさんおばさんがいるけど、あの人達にスマホとかタブレットは難しいだろうなぁ・・・そして私もその1人・・・。
http://anond.hatelabo.jp/20140421200127
で、Windows8使ってるわけだけど、少々使いづらいので、自分なりに使いやすいようしたTipsを備忘録もかねて少し書いてみる。
MSはアップデートでスタートメニューを復活させると先日発表したけどそれまでのつなぎとして。あるいは復活したメニューが期待した通りのものでなかった場合の対処法として。
我々はすでに8.1のアップデートで一度MSに裏切られた。「コレジャナイ!」
win8にスタートメニューを追加するソフトはいくつかあるけれど、この方法でスタートメニューもどきを作る利点はOSの標準機能だけで実現できること。
セキュリティ/運用ポリシー的にソフトのインストールが禁止されていてもこの方法なら可能かと。
作ったメニューにwindowsのシャットダウンと休止状態の機能を追加する。
フォルダを開いて右クリック → 「新規作成」 → 「ショートカット」 で「項目の場所を入力してください」に以下を入力
dim objShell set objShell = CreateObject("shell.application") objshell.ShutdownWindows set objShell = nothing
スクリプト類は直接メニューフォルダに置くのではなく、どこか別のフォルダに置いてショートカットを介すほうがいいかもしれない。そうすればショートカットに好きなアイコンを設定できる。
ショートカットファイルを右クリック、「プロパティ」 → 「ショートカット」タブ → 「アイコンの変更」ボタン で変えてしまおう。設定にするのにちょうどよいシステムの主要なアイコンは %SystemRoot%\system32\SHELL32.dll にまとめて入っている。
あとは %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools に「ファイル名を指定して実行」などの特殊なショートカットがあるので、これをコピーしてメニューに放り込む。
かつてのwindowsのスタートメニューにあった「プログラム」メニューに相当するフォルダはwin8にも存在する。
\ProgramData\Microsoft\Windows\Start Menu\Programs
作ったメニューフォルダから上記フォルダにシンボリックリンク(ショートカットは不可)を張ると「ブログラム」のサブメニューが実現できる。
%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
上記フォルダにテキストファイルを新規作成して以下を書き込み「デスクトップの表示.scf」などの名前で保存。
[Shell] Command=2 IconFile=explorer.exe,3 [Taskbar] Command=ToggleDesktop
近年、関数型プログラミングの重要性はいろんなところで叫ばれています。
Javaの最新バージョンに関数型プログラミングに関する新機能が加わりました。
Rubyも昨今、関数型プログラミングへのサポートが手厚くなってきています。
プログラミングの教科書の大手、オライリー社から、Javascriptで関数型プログラミングを行うための解説書が発行されました。
関数型プログラミングへの注目度は高まってきています。
おそらく、みなさんは既にオブジェクト指向が何か、を知っています。
でも関数型プログラミングとは何か、胸を張って語れる人は、周りに見当たらないかと思います。
実際、オブジェクト指向によってプログラミングする方法は、わかりやすい解説があちこちにある一方で、
関数型プログラミングとは何か、何が良いのか、ということについての、よいまとめは見つけることはできませんでした。
この記事を読む方の中で、「関数型プログラミングを取り入れるか・取り入れないか」で切実に悩んでいる人は、おそらくいないでしょう。
この記事はあまり細かいところに立ち入りません。関数型プログラミングを使う側の立場に立って、利点や向き・不向き、それが導くスタイルを書きました。
みなさんは鳥のように飛んで、高い空から、関数型プログラミングとは何か、何が良いのか、を見渡してください。
オブジェクト指向的アプローチは、名前をつけてプログラムを整理する。
関数型プログラミング的アプローチは、汎用部品でなんとかする。
Googleが近年リリースした言語、Goには、”継承”を直接サポートする仕組みが無いことが話題になりました。
また、Mac OSXの基幹ライブラリCore Foundationは、ライブラリ自体はC言語で書かれているにもかかわらず、その設計方針は明確にオブジェクト指向です。
その本質とは"名前をつけて対象を識別し、それを扱うこと"、にあります。
最もプリミティブなオブジェクト指向の対象は、ファイルハンドラです。あるファイルを開いて、読み込んで、あるいは書き込んで、ファイルを閉じる。
これらの処理をまとめたら、わかりやすいですよね?
対象に関する処理を、対象の周りにまとめる。これがオブジェクト指向の基礎的な理念です。
識別することとイコールで比較できることは、とても良く似ています。
イコールによる比較は、オブジェクト指向では鬼門であることが知られています。
PointクラスのインスタンスとColoredPointクラスのイコール演算をどう決めればいいかに、正解はありません(詳しくは"effective java"をご参照ください)。
また名前をつけて識別する対象は、フワフワしていてはいけません。
たとえば、"軍人の階級"をオブジェクトにしたとしましょう。"大佐"クラスのある兵士は名前のフィールドや、性別のフィールドを持っているでしょう。
ところで彼が昇格したときに何が起こるでしょうか。
新たに"少将"クラスのインスタンスが作られます。"大佐"クラスを破棄する前に、名前、性別、その他沢山のデータを引き継がなくてはいけません。フィールドを増やしたい場合はその都度コードに修正を加える必要があります(*)。
なるべくイコール比較を避けたい。対象は不安定なものではいけない。では何に名前をつけて、識別するか。そこにオブジェクト指向技術者の熟練度が現れるのです。
一方、関数型プログラミングでは、特定の何かに名前をつけるより、極力、汎用部品でなんとかしようとします。
関数自体をリストなどのデータ構造に詰めることもよく行われます。
実は、関数型プログラミングというのは本質を表していません。
関数をはじめとして、リスト・ツリーのようなコンテナ、手続きを抽象化したもの、回路を抽象化したもの。
あらゆる対象を値として、合成し、ときに分解し、新しい値を作ります。
変数に適用する処理を作りあげることが、とても簡単だからです。
四則演算が定義されたデータを詰めたデータ構造もまた、四則演算可能だったり。
誤解を恐れずに言うと、オブジェクト指向がトップダウンなのに対し、関数型プログラミングはボトムアップです。
関数型プログラミングをサポートする言語には、沢山の汎用部品が定義されています。
このような構造をインターフェイスとして、様々なライブラリが組まれているので、
たとえばモナドを知っていれば、30分程度でパーサー(解析機)を理解することができて、
パーサーを理解できれば、JSONパーサー・ XMLパーサー・markdownパーサー・C++パーサー ... などを理解するのはとても容易です。
理解しやすいこと。これが関数型プログラミングの大きな利点です。
追記:
また、汎用部品と型のお陰で、ライブラリのドキュメントが圧倒的にひきやすい、というメリットも有ります。
Haskellな人がPythonにトライした結果 - Togetterまとめ
関数型プログラミングは「厳密な事前設計を必要とするため、簡単なことをやるのにも時間が掛かる」。
>> map (*2) [1,2,3] [2,4,6]
邪魔な”儀式”や、"おまじない"のコードが徹底的に撤廃されているためです。
関数型プログラミングのコードは、潔癖かつ濃密です。
たとえばC言語でint hoge(int x,int y)が定義されているとき、hoge(3)はなんの意味も持ちませんが(コンパイルでコケますが)、関数型プログラミングでは意味があり、実際に有用です。
上の例では、「掛け算をする」(*)関数は、二引数関数ですが、それに引数を渡して作られた「2を掛ける」関数(*2)は、一引数関数になります。
関数型プログラミングでは、「簡単なことは簡単にでき、複雑なことは複雑にできる。ただし、間違ったことは殆どできないか、全くできない」。
また、静的型付けの力によって、コード補完は非常に強力になっています。インテリセンスの比ではないです。
たとえば、関数中のある表記の型を任意に表示できます(GHC/TypedHoles - HaskellWiki)。
やがてやってくる未来には、プログラムをテキストエディタで書くことは時代遅れになっているでしょう。
統合環境のサポートで、バグやミスの少ない、スムーズなプログラミングができます。
そしてその環境で動くプログラミング言語は、関数型プログラミングをサポートした言語なのです。
以下の様な兆候を感じたら、あなたはそのプログラムを関数型プログラミングで書くべきです。
一般に、オブジェクト同士の相互作用が複雑になるほど、オブジェクト指向では手に負えなくなっていきます。
そういうときは、オブジェクトを直接扱わず、替わりにその"相互作用"を扱うことで、複雑さを軽減するアプローチが有効です。
それこそが関数型プログラミング的アプローチです。
特にオブジェクト指向が有効なのは、プログラミング初心者がそのコードをいじるかもしれないときです。
関数型プログラミングは、強固さと柔軟さの代償として、高い学習コストを伴います。
オブジェクト間の相互作用が複雑でなく、着目している(名前をつけている)概念が安定しているとき。
そして、プログラムをいじる人たちの間で共通理解が図れているならば、オブジェクト指向が有利です。
遅延評価という機能によって、レガシーな言語で扱えなかった、巨大な数を扱うことができます。
関数型プログラミングで書かれたプログラムは、正確さが要求される、金融関連の業界で使われています。
手続きとしてパーサーを記述できるので、テキスト処理プログラムはより理解しやすく、メンテナンスしやすいものになります。
関数型プログラミングを知らない人は、「正規表現でおk」と言いますが、
彼の書いた複雑な正規表現は、半年後には(書いた本人でさえ)理解できなくなっていることでしょう。
手続き一般を扱うことができるので、途中で割り込みのある手続きの表現も容易です。
関数型プログラミングをサポートしていない言語ではコルーチン(ファイバー)などをつかってなんとかするしかありません。
さもなくば、非並行処理では普通に関数として記述できるところを、並行処理のために、Builder,Strategy,Command,Interpreterパターンを駆使して書き直すことになります。
Javascript使いの方は、Deferredなどの構造を使うでしょう(http://qiita.com/KDKTN/items/4c6986049d204f0645d8)。
C++使いの方はBoostで頑張りましょう。破滅的に解りにくいコンパイルエラーメッセージと格闘してください。
もう少し簡単な例をあげます。
あなたは、あるレシピにしたがって、自動的に料理を行うマシンの制御プログラムを書いているとしましょう。
1. まず玉ねぎを炒める。
2. 飴色になったら、肉を加えて炒める。
3. 野菜を加える。
4. 水を加えて煮る。
5. スパイスを加える。
…できませんよね?何故ならば、各ステップの"間に"、マシンのロボアームの位置や動きを調整する処理が必要だからです。
これをオブジェクト指向でやろうとすると、各ステップの副作用として、それらの処理を行うことになります。
そうすると、マシンが二機に増えた時などの変更量は、絶望的なものになります。
あるいは関数として表現するのを諦め、手順全体をDSLで記述できるようにします。
このアプローチは関数型プログラミング的です。しかし関数型プログラミングをサポートした言語の助けなしでは、そのDSLを記述するために沢山のユーティリティーコードを書かなくてはならないでしょう。
オブジェクト指向的アプローチでこの問題をエレガントに解こうとすると、クラス化の粒度を上げる事になります。
野菜クラス、フライパンクラス、ボイルクラス、フライクラス、焼き加減クラス、アームクラス、野菜の大きさクラス、切り方クラス、焼き方クラス、"焦げたよ"クラス、etc...
こうすると早晩レシピはプログラムのコード上から消え去ることになります。上記のたった5行は、依存性注入のオブジェクトグラフを構築するコードに取って代わることになります。そこには沢山の挙動の制御がオプションとして付記されているのです。
カレーなど、ある種のレシピに限定することで、見た目の理解しやすさを得ることができますが、一方それは表現力を損なうことを意味します。
C言語などではマクロを使うこともできますが、それは結局、関数型プログラミング的アプローチの意味するところと同じになります。すなわち、補助のために沢山のコードを書くことになるでしょう。
iOSのAppstoreアプリは、"無料"と書かれたボタンを押すと、それが"インストール"ボタンに変わり、それをもう一度押すと、ダウンロードの進捗を表すインジケータに変わり、それを押すとダウンロードをキャンセルできます。
このように、位置は同じなのに、ステートに依って見た目と機能が変わるボタンは複雑です。
これをオブジェクト指向で実現しようとすると、
という下らない問題にぶつかります。
一方関数型では、"機能"、"見た目"、"状態"、を独立に扱って、それらを合成してボタンを作るので、迷うことはありません。
「同じ位置にあるUIオブジェクトは、コード上で(インスタンスとして)独立して、他から干渉を受けない」
この条件が満たされているうちは、オブジェクト指向でGUIを実現することに無理はありません。
しかし、携帯端末のような小さい画面で、多くの機能を達成するためには、UI要素はコンテキスト依存的に複雑になりがちです。
近年、PCのディスプレイの大きさは、頭打ちになってきました。
画素数は増えているのですが、MacにおけるRetinaのように、複数ピクセルでひとつのドットを表すようになってきています。
これは、ひとつの画面に置かれるボタンなどのUI要素の数は、これから先の未来で増えることはない、ということを意味します。
したがって、未来のGUIのプログラミングは、注意深く機能をピックアップして制限するというデザイナーの努力を脇におけば、
関数型プログラミングの力を頼るしか無いでしょう。
つまり…
Haskell さいこうなのおおおおおおおおおおおおおおおおおお!! おしっこ漏れちゃうのおおおおおおおおおおおおおおおおおおおお(゜∀。)ワヒャヒャヒャヒャヒャヒャ
1. google:すごいHaskellたのしく学ぼう を注文する。
2. Download Haskell を自分のPCに導入する。
3. コンソールにghciと入力して、対話型コンソールを立ち上げる。
4. 次の関数をコンソールに打ち込んで、結果を見る。即値で書かれているところとかをいろいろ変更してみて、感動する。
take 4 $ map (*2) [1..]
追記:
いかがでしたか?
ちまたには、関数型プログラミングの利点は変数が無いことだ、とか、より安全だから、とか、より速いから、などという妄言が満ち溢れています。
オブジェクト指向と関数型プログラミングは、水と油ではありません。プログラマは自分のプログラムに最適なアプローチを選ぶことができます。
一般にはあまり知られていないことですが、Haskellにもオブジェクト指向へのサポートがあるんです(Lensライブラリ、これを使用したサードパーティ製ライブラリも最近増えてきています)。
この記事を読んだオブジェクト指向プログラマのあなたが、少しでも関数型プログラミングに(そしてHaskellに)興味を持ってくださって、ホームセンターの大人用オシメのコーナーが大賑わいになれば幸いです。。
とりあえずVirtualBoxをインストール。ここで躓く人は話にならんので置いていく。
http://archive.ubuntu.com/ubuntu/dists/saucy/main/installer-i386/current/images/netboot/mini.iso
こいつをダウンロードする。インストールCDROMのイメージファイルだ。ウインドウ環境とかなくてCUIだけのやつ
VirtualVBoxで「新規」とする。
こう打ったら「続ける」を押す
メモリは1024MBくらいでいいんじゃないの。大したことしないし
仮想ハードドライブは「作成する」フォーマットはVDIでよろしい
ストレージのタイプは可変でも固定でもいいけど俺なら可変にするかな
で、8GBで作成。Cをいじるなら十二分すぎる。2GBくらいでもいいよ
次。「設定」の「ストレージ」でIDEが空になってると思うから「IDE」の部分を選択して「+」のついたアイコンを押す。丸い方ね。CDROMの代わりだから。
OKを押したら「起動」をクリック。
Ubuntuの画面が出ると思うから、矢印で「Install」を選んでエンター。言語選択になるからJapaneseね
キーボードも初心者なら日本語キーボード使ってるだろうからそれに従う。不安なら、「2」の上が「@」になってればUSキーボード、「”」になってれば日本語キーボード
Ubuntuの画面に入ると抜けられなくなるから、抜ける時は「Alt」を押せばいい。多分。
あとアーカイブミラーとかいろいろ聞かれるけどデフォルトでおk
そうこうしてるとインストールが始まるから数分眺めてればよろしい
本名とか聞かれるけどスルーでよい。ユーザー名は大事だからよく使うものを。パスワードも一応堅牢なものにしようね
ホームディレクトリは暗号化しなくよろし。盗まれて困るようなもの作らないでしょ
その後英語でタイムゾーンはAsia/Tokyoか?って聞いてくるのでYES(あるいは「はい」)
「ディスクに変更を加えるか?」のデフォルトがNOなのでYESを押す
そうすると「ベースシステムをインストールしています」と出るのでまた数分待つ。お茶でも入れよう
セキュリティアップデートについて聞かれるな……。手動でいいんじゃないの?うっかりさんは自動で。
適用するプログラムの一覧とか出るけど、特にこれってのがなければ無視で。後から入れられるので。あ、G++があるかどうか確認せずに次いっちゃった。まあいいか
GRUBがどうのとか聞かれるけどVirtual環境でマルチブートする意味はほとんどないのでそのままYESで
そうこうしてるうちに「インストールおめでとう」みたいな感じになって最初の画面にもどるので
電源OFFで。構わん。OFFで。
「設定」の「ストレージ」でさっきのmini.isoを外す。選択して「ー」ボタンで外せるから。
そこまでしたらもっかい起動してみて。
みたいになったら成功。
登録したユーザーとパスワードを打ったらログインできる。できない人は打ち間違いかもしれないのでやりなおし。
ここで気づいたのだが、端末のフォントが日本語に対応してないので次のコマンドを打つ
export LANG=C
export LOCALE=C
... | fun x:: cmd1 x : cmd2 x : ... : cmdn x | ...
一行毎に処理する場合はxargs -Iを利用する。
$ ls *txt a.txt b.txt $ cat a.txt 1 $ cat b.txt 2 $ ls *txt | fun x:: echo x : cat x a.txt b.txt 1 2 $ ls *txt | xargs -Ix fun _:: echo x : cat x a.txt 1 b.txt 2
>と<はそれぞれ大小の不等号で置き換えてくださいな
#!/usr/bin/env python import sys from subprocess import * def take_variable(var): # check the syntax of variable (http://www.gnu.org/software/bash/manual/bash.html) # variable ::= (_|[A-z])(_|[A-z]|[0-9])* # variable contained space if len(var.split()) > 1: raise Exception('fail: the variable contained space') # check head if not (var[0].isalpha() or var[0] == '_'): raise Exception('fail: the variable contained wrong character') # check the body of variable b = True i = 0 for c in var[1:]: i += 1 # is variable contained invalid character? if not (c.isalpha() or c.isdigit() or c == '_'): b = False break # no exception if thre are only spaces after variable if not b and not var[i:].isspace(): raise Exception('fail: the variable contained wrong character') elif b: return var[0] else: return var[:i] def parse(var_to_cmds): # check the position of '::' try: pos = var_to_cmds.index('::') except Exception: raise Exception('not exists "::"') var = var_to_cmds[:pos] cmd_str = var_to_cmds[pos+2:] # check the format of variable and commands if var == '': raise Exception('fail: no variable before "::"') elif cmd_str == '': raise Exception('fail: no commands after "::"') return (take_variable(var),cmd_str) if __name__ == '__main__': # parse variable and commands try: var,cmd_str = parse(' '.join(sys.argv[1:])) except Exception, e: print >>sys.stderr, e sys.exit(1) # var -> val val = sys.stdin.read().replace('\n',' ') # mapping and split by ':' again commands = map( (lambda cmd: cmd.replace(' '+var+' ',' '+val+' ')), cmd_str.split(':')) # exec command for cmd in commands: try: # need split for remove spaces check_call(cmd.split()) except Exception,e: # print >>sys.stderr, e sys.exit(1)
本当はfunじゃなくて\(バックスラッシュ)で、:: じゃなくて→にしたかったんだけど、シェルが置き換えちゃうからしかたない
シェルの改造は禁断の手段だし
export http_proxy="http://<プロキシサーバ名>:<ポート>"
export https_proxy="http://<プロキシサーバ名>:<ポート>"
などと指定すればOKのようです。
sudo wget のように、スーパーユーザーで利用するときは、当然スーパーユーザーの環境で動作するので、私は
でスーパーユーザーへ根本的にシェルのユーザーを切り替えて、sudo 切り替えなしで wget を利用しました。
すなわち su でスーパーユーザーになってから export http_proxy=... を発行。sudo wget ... ではなくそのまま wget ...。
sudo export
暇だったので現時点でサルベに載ってるカードの価格調査をしてみた。
アンコモンとかはしらん。こうやって見ると意外と安いカードの多いことで...
50 Molten Disaster
50 Verdeloth the Ancient
50 Earwig Squad
120 Skeletal Vampire
149 Rude Awakening
150 Ryusei, the Falling Star(M)
200 Jugan, The Rising Star(M)
300 Stonehewer Giant
300 Meloku the Clouded Mirror
300 Countryside Crusher
300 Greater Gargadon
350 Dragonstorm
399 Death Cloud
400 Pyromancer's Swath
400 Jhoira of the Ghitu
400 Cold-Eyed Selkie
450 City of Brass
473 Keiga, the Tide Star(M)
473 Squee, Goblin Nabob
498 Scion of Oona
計22枚(M=3) 神話抜きの平均=300,47円
~1000
525 Adarkar Valkyrie
700 Figure of Destiny
750 Reveillark
800 Demigod of Revenge
800 Extirpate
800 Lotus Bloom
800 Yosei, the Morning Star(M)
890 Life from the Loam
計10(1) 744,44円
1001~1500
1050 Woodfall Primus
1100 Progenitus(M)
1155 Sarkhan Vol(M)
1180 Ethersworn Canonist
1200 Tombstalker
1200 Summoner's Pact
1300 Maelstrom Pulse
1300 Kira, Great Glass-Spinner
1500 Bridge from Below
1500 Tooth and Nail
1500 Blinkmoth Nexus
計16(2) 1215,00円
1501~
1600 Kokusho, the Evening Star(M)
1600 Glimmervoid
1600 Aether Vial
1780 Pact of Negation
1800 Engineered Explosives
1800 Vedalken Shackles(M)
2200 Doubling Season
2400 Elspeth, Knight Errant(M)
2500 Cryptic Command
2700 Arcbound Ravager
2730 Sword of Light and Shadow(M)
2900 Kiki-Jiki, Mirror Breaker(M)
5670 Vendilion Clique(M)
6300 Dark Confidant(M)
12500 Tarmogoyf(M)
計16(9) 2025,71円
「プロテクトかけたアルゴリズムを実装したバージョンに差し替え」たなんて言われると本当に「プロテクト」がかかっているのか確かめてみたくなるのが人情というもの。というわけで、プロテクト強化後のもふったー(v0.9.6b)からconsumer secretが抜けるか試してみた。結論から言うと、あっけなく取り出せた。以下に手順を記す。
動作がよくわかっていないアプリケーションを解析して仕様を明らかにすることをリバースエンジニアリングと呼ぶ。ソフトウェアのリバースエンジニアリングは基本的に対象を逆アセンブルしてひたすら読むことによって行う(その補助に1命令ずつ実行してレジスターやメモリーの様子を観察することもある)。しかし、よっぽど小規模なものでなければオブジェクトコード全体を逆アセンブルして最初から最後まで読むなんてのは不可能だ。人間の読速度には限界があるし、時間も有限だからだ。そして、詳しい動作を知りたい部分というのは全体のごく一部であることが多いので全逆アセンブリを読むのには非常に無駄が多い。
だから、リバースエンジニアリングではいかに詳らかにすべき動作を行っているコードを絞り込むか(=読むべき逆アセンブリを少なくするか)が重要になる。
この場合も同様だ。TwitterのGUIクライアントを頭から読むのは到底無理なので、どうやって解析すべきコードの範囲を狭めるかを考えた。それにはOAuth認証においてconsumer secretがどのような役割を果たすのかを知る必要がある。
OAuth認証で、consumer secretはそのままサーバーに送信されたりはしない。signatureの生成にHMAC-SHA1が使われ、その鍵にconsumer secretが使われる。HMACは次のように算出される。
HMAC (K,m) = H ((K ⊕ opad) ∥ H ((K ⊕ ipad) ∥ m))
ここで
である。
まずはこのあたりから攻めようと思った。SHA-1の計算にはいくつか特徴的な定数が使われるので、そこからSHA-1の計算に使われているであろう関数444190を特定する。この関数のエントリーポイントに中断点(ブレークポイント)を設定してOAuth認証をさせるべくもふったーの「ブラウザで認証」ボタンを押す。狙い通り中断するので関数を抜けるまで実行する。関数401100の4012DAに出た。少し下を見るとこのようになっている。
CPU Disasm Address Hex dump Command Comments 00401311 |. 33F6 xor esi, esi 00401313 | 8D8C24 A40000 /lea ecx, [local.54] 0040131A |. 394C24 14 |cmp dword ptr ss:[local.90], ecx 0040131E |. 75 0E |jne short 0040132E 00401320 |. 3BF5 |cmp esi, ebp 00401322 |. 73 29 |jae short 0040134D 00401324 |. 0FB68434 A400 |movzx eax, byte ptr ss:[esi+esp+0A4] 0040132C |. EB 21 |jmp short 0040134F 0040132E | 3BF5 |cmp esi, ebp 00401330 |. 73 1B |jae short 0040134D 00401332 |. 8B5424 18 |mov edx, dword ptr ss:[local.89] 00401336 |. 52 |push edx ; /Arg1 = [LOCAL.89] 00401337 |. 8D8C24 FC0000 |lea ecx, [local.33] ; | 0040133E |. 8BD6 |mov edx, esi ; | 00401340 |. E8 CB4D0000 |call 00406110 ; \mofooter.00406110 00401345 |. 83C4 04 |add esp, 4 00401348 |. 0FB6C0 |movzx eax, al 0040134B |. EB 02 |jmp short 0040134F 0040134D | 33C0 |xor eax, eax 0040134F | 34 5C |xor al, 5C 00401351 |. 888434 B80000 |mov byte ptr ss:[esi+esp+0B8], al 00401358 |. 83C6 01 |add esi, 1 0040135B |. 83FE 40 |cmp esi, 40 0040135E |.^ 72 B3 \jb short 00401313 00401360 |. 895C24 3C mov dword ptr ss:[local.80], ebx
0040134F | 34 5C |xor al, 5C
が注意を引く。もしかしてこれはopadとのxorではないか?
00401351 |. 888434 B80000 |mov byte ptr ss:[esi+esp+0B8], al
はxorした結果を格納している。
先ほどの中断点は無効化しこのループを抜けた地点である401360まで飛ばす。この時点でesp+0B8を見ると次のようになっている。
Hex dump 64 2E 16 64|37 04 32 6D|0F 0D 26 29|3A 37 1F 2F| 18 69 6E 6E|0D 25 29 33|11 34 29 69|12 36 24 1E| 05 16 33 6A|04 3B 0E 68|7A 5C 5C 5C|5C 5C 5C 5C| 5C 5C 5C 5C|5C 5C 5C 5C|5C 5C 5C 5C|5C 5C 5C 5C|
あとはこれと5Cとをxorすればconsumer secretが手に入る。終わり。
はてなは増田のスーパーpre記法で半角の<>が含まれていると投稿が出来ないのを早く直してください。
もふったーの作者から反応があった。「本気だったつもりのもふったーのデバッグ処理が残ってた」らしい(http://blog.livedoor.jp/blackwingcat/archives/1763951.html)。修正したとのことなので最新版(v0.9.6e)を見てみた。確かに若干変更されているが何の問題もない。SHA-1の呼び出しに中断点を設置して渡されているバイト列を見るだけ。
CPU Disasm Address Hex dump Command Comments 00401324 |. 8D4424 20 |lea eax, [local.102] 00401328 |. 50 |push eax ; /Arg1 = 00401329 |. E8 623A0400 |call 00444D90 ; \mofooter.00444D90
ここでeaxが指すメモリーを見ると以下のようになっている。
01 23 45 67|89 AB CD EF|FE DC BA 98|76 54 32 10| F0 E1 D2 C3|00 02 00 00|00 00 00 00|40 00 00 00| 40 4F 73 53|62 54 5C 7E|59 57 53 42|55 45 7A 57| 61 47 7A 5B|42 4F 7B 61|5D 66 5E 7A|42 7F 40 63| 79 66 05 55|79 4C 60 42|02 10 36 36|36 36 36 36| 36 36 36 36|36 36 36 36|36 36 36 36|36 36 36 36|
これまで他の人に用意してもらったサーバで自分のプログラムを動かしたことはありましたが
自分自身で一からサーバをセットアップしたことはほとんどなかったので、いろいろとハマりました。
作業を進める上で困ったり考えたりしたことを書いていきます。
ちなみにサーバ自体はさくらのクラウド、OSにはCentOSを使用しているので、それ前提のお話になります。
最初にサーバを起動してから速やかにSSHとファイヤーウォールの設定を変更しました。
はてブなんかでも定期的に話題になっているのでおなじみですね。
・SSHやHTTP(S)など、どうしても公開しなければならないポート以外は遮断する
さらっと書きましたが、設定をミスって自分自身もログインできなくなり、何度かOSの再インストールを繰り返しています。
後から気付いた事ですが、さくらのクラウドではクラウド管理画面のリモートスクリーン経由でローカルログインできるので
別にOS再インストールしなくてもiptablesの設定を変更できたんですよね...
逆に言うといくらファイヤーウォールとSSHを設定しても管理画面にパスワードログインの環境が残ってしまうので
パスワードの管理には引き続きしっかり気を使う必要がある。ということでもあります。
httpd,php,mySQL,memcachedなど必要なサービスをインストール、設定し
作成したWebアプリのプログラムを乗せて動かしてみました。が、動作が重いような...
開発環境ではさくさく動いていたのに、本番環境ではどのページ遷移ももっさりしています。
abで計測してみたところ、開発環境のおよそ2分の1のスコアとなってしまいました。
開発環境が仮想2コアのメモリ1Gだったのに対し、本番環境が仮想1コアのメモリ2Gと
CPUの性能について半減しているのでそのせいかな、と思いつつ設定を見なおしていたところ
特に使っていないと思われたipv6を停止した途端にパフォーマンスが改善されました。
ページ遷移に伴うもっさり感が解消され、abの計測結果も開発環境と遜色ない結果が出ています。
デフォルトで有効になっていたipv6の影響により余計な処理が走っていたのかもしれません。
パフォーマンス改善に喜んだのも束の間、会員登録などの処理でWebアプリからメールを送信したところ、Gmail宛のメールがことごとく迷惑メールと判定されるという事案が発生。
spfの設定を行なう、メールの内容について吟味するなどの回避策を試してみましたが一向に改善されません。
試しにHotMailとexciteのメールアカウントに送信したところ、そちらではそもそもメールを受け付けてもらえずエラーコードが返って来る始末。
困り果てていたところ、エラーの内容からサーバのIPがspamhousにスパム送信元として登録されていることが判明しました。
postfixのホスト名の設定がデフォルトで「localhost.localdomain」などとなっており、それをそのまま使っていたためにGmailがスパム送信元として通報してしまったようです。
設定を修正し、spamhousに解除依頼を提出。事なきを得ました。
クラウドを利用すれば、サーバを停止することなく簡単な設定でスケールできるようになる。
と、自分で勝手に思い込んでいたせいなのですが、消えては困るデータの一部をmemcachedに保存する実装を行なっていました。
実際のところさくらのクラウドではサーバを完全に停止しなければプラン変更を実施できないし
そもそもサーバが落ちたらどうするんだよ。ということで、急遽KVSを変更する必要に迫られました。
速度の低下が気にかかったため、いくつかの候補を実際に動かし
phpのスクリプトから1万件のデータ読み書きを行うという形でmemcachedと比較してみたところ次のような結果に。
サービス | 1万件書込 | 1万件読込 |
memcached | 2.55秒 | 2.30秒 |
handlersocket | 21.23秒 | 2.71秒 |
InnoDB | 20.23秒 | 5.10秒 |
kyotoTycoon | 8.22秒 | 7.72秒 |
さすがに読み書きそれぞれmemcachedが最速ですが、読み出しについてはhandlersocketも負けていません。mySQLから普通にSELECTしてもmemcachedの2倍程度の時間しかかからないという結果が意外でした。
しかしながら書き込みのほうではhandlersocketもmemcachedの10倍近くの時間がかかっており、少々速度的な影響が気になってきます。memcachedの倍のパフォーマンスを記録したという記事を見たことがあるので、設定、チューニングについて生かしきれていない部分があるのかもしれないとも思いましたが、知識が不足しているところで無理をすると問題が発生した時に対処できないと考え、候補から除外することとしました。
結局、今回の用途では読み込み処理より書き込み処理のほうが圧倒的に多いことも考慮し、kyotoTycoonを採用しました。実際の利用箇所に組み込んでabで計測してみたところ、だいたい30%程度のパフォーマンス低下にとどまっており、これなら許容範囲かと考えています。
実行系と参照系に分ける形でmySQLのレプリケーションを行なっていたのですが、度々レプリケーションが停止する現象が発生しました。
一部のテーブルについて肥大する可能性が考えられたため、参照系に接続するプログラムで使わないテーブルをレプリケーションから除外していたのが原因です。
例えばtabelAをレプリケーションし、tableXをレプリケーションしないという設定にしたうえで
実行系でINSERT INTO `tableA` SELECT `value` FROM `tableX`などといったクエリを発行すると、参照系にtableXが無いためエラーが発生して止まってしまいます。
レプリケーションするテーブルを限定する場合はプログラム側でも注意を払わないと危険です。当たり前ですが。
監視といえばcactiやnagiosが定番なのかもしれませんが、設定が複雑そうで尻込みし、monitを使用することにしました。
簡単な設定でloadaverageやメモリ、HDDの使用量をチェックできるほか
httpdやmysqldなどといったサービスのプロセスを監視し、もし落ちていたら自動で起動してくれるので助かります。
パスワード保護を行うとしても、サイト全体の管理画面など自分しか使わないプログラムはWebに晒しておきたくない。
というわけで、一部のWebアプリを秘匿する設定を行いました。
管理画面のWebアプリを9999番など閉じているポートに設置した上で、SSHを利用したトンネルを掘ります。といっても
上記のようなコマンドで管理画面のWebアプリを置いたサーバへログインするだけです。
ブラウザのアドレス欄にhttp://localhost:9999/と打ち込めば、接続が開いている間のみアクセス可能になる感じですね。
サーバにログインできる人でなければ実行できないことなので、気分的にある程度安心します。
自動でログのバックアップを行いたいと考えたのですが、パスワード無しの鍵でログインして転送する形には抵抗がありました。
調べてみたところ、authorized_keysに公開鍵を記入する際の設定で、その鍵でできることを制限するという手段があるようでした。
具体的には、authorized_keysに
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="some commands" ssh-rsa AAAAB3NzaC1yc2EAAA...
などとして公開鍵を追加しておくと、その鍵でログインした直後にcommand=""の部分で設定したコマンドを実行して接続を終了する挙動となり
接続のフォワードもできなくなるため、パスワード無しでも鍵の流出に関するリスクを最低限に留めることができるというわけです。
commandの実行結果は標準出力から受け取ることができるので、例えばcommand=""の部分にファイルの内容を表示する処理を設定していたとすれば
ssh -i .ssh/no_password_key user@xxx.xxx.xxx.xxx > /path/to/file
などとしてログインの結果をファイルに書き込むだけで、簡単にファイルの転送が実現できます。
他にも大小さまざまな問題に行きあたりましたが、忘れてしまったor書ききれないのでここまでとします。
たった1つのサイトを公開するにしても問題というのは尽きないものだと実感させられました。
今は基本的な情報だけでなく、ちょっと突っ込んだ内容でも検索で解決していけるので嬉しいですね。手がかりを残してくれた先達に感謝することしきりです。
現状ではひとまずの見切りを付けて公開していますが、より堅牢で負荷に強いサーバとなるよう、随時チューニングを行なっていこうと考えています。
個人サイトや小規模な商業サイトなどプロモーションにあまりお金をかけられないサイトを主な対象とした、無料で出稿できる広告ネットワークサービスです。
既存のサービスで近いのは「あわせて読みたい」や「zenback」、各社提供のRSS相互リンクサービスなどになるでしょうか。
広告としての体裁がある分、それらより若干積極的な性質になるのではと考えています。
現時点ではサービス本体のプロモーションに苦心するという本末転倒そのものの状況でありますが、もしよろしければ見ていただけると嬉しいです。
http://www.wired.com/dangerroom/2012/12/nork-problems/
“North American Aerospace Defense Command officials acknowledged today that U.S. missile warning systems detected and tracked the launch of a North Korean missile at 7:49 p.m. EST,” noted the statement. “The missile was tracked on a southerly azimuth. Initial indications are that the first stage fell into the Yellow Sea. The second stage was assessed to fall into the Philippine Sea. Initial indications are that the missile deployed an object that appeared to achieve orbit. At no time was the missile or the resultant debris a threat to North America.”
まったく使ってないわけじゃないみたいよ。
FreeBSD security run output (cron@/usr/local/etc/periodic/security/415.rkhunter)
Running rkhunter...
Warning: The file '/etc/passwd' exists on the system, but it is not present in the rkhunter.dat file.
http://permalink.gmane.org/gmane.comp.security.rkhunter.user/2584
the cron job running RKH uses a PATH which includes /etc and as such RKH sees /etc/passwd as a command (and so to be checked).
But when the user runs 'rkhunter --propupd' his PATH doesn't include /etc and so /etc/passwd is not recorded in the rkhunter.dat file.
USER_FILEPROP_FILES_DIRS="/etc/passwd"to your config file. RKH should then always see the file regardless of the PATH.
# rkhunter --propupd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 115 # rkhunter --propupd /etc/passwd Filename is not in the "rkhunter.dat" file: /etc/passwd # env PATH=${PATH}:/etc rkhunter --propupd /etc/passwd Filename is not in the "rkhunter.dat" file: /etc/passwd # env PATH=${PATH}:/etc rkhunter --propupd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 116 # env PATH=${PATH}:/etc rkhunter --propupd /etc/passwd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 1 of 116 # rkhunter --propupd /etc/passwd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 0 of 115 # rkhunter --propupd /etc/passwd Filename is not in the "rkhunter.dat" file: /etc/passwd
# rkhunter --propupd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 115 # echo 'USER_FILEPROP_FILES_DIRS="/etc/passwd"' >> /usr/local/etc/rkhunter.conf # rkhunter --propupd /etc/passwd Filename is not in the "rkhunter.dat" file: /etc/passwd # env PATH=${PATH}:/etc rkhunter --propupd /etc/passwd Filename is not in the "rkhunter.dat" file: /etc/passwd # rkhunter --propupd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 116 pen4# rkhunter --propupd /etc/passwd [ Rootkit Hunter version 1.3.8 ] File updated: searched for 167 files, found 1 of 116
1, about the trickle charge, rapid charging and stable battery charging algorithm
According to the energy requirements of the final application, a battery may contain up to 4 lithium ion or lithium polymer battery core, its configuration will have a variety of change, at the same time with a mainstream power adapter: direct adapter, USB interface or car charger. Remove the core quantity, core configuration or power adapter type difference, the battery has the same charge characteristics. So they charge algorithm. Lithium ion and li-ion polymer battery best charging algorithm can divided into three phases: trickle charge, rapid charging and stable charge.
Advanced battery charger with additional security function normally. For example, if the core temperature exceeds the given window, usually 0 ℃-45 ℃, charge will be suspended.
Remove some very low-end equipment, now on the market/li-ion polymer lithium ion battery solutions are integrated with the outer components or, in accordance with the characteristics of the charging to charge, this is not just to get better effect charge, but also for safety.
LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. Figure 1 for double input 1.2 A lithium battery charger LTC4097 schemes. It USES constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone. The performance characteristics: no external micro controller charging termination; The input power automatic detection and choice; Through the resistance from the exchange of charging adapter input can be as high as 1.2 A programming charge current; The resistance of programmable USB charging current is up to 1 A; 100% or 20% USB charging current set; The input power output and existing bias NTC (VNTC) pin as a 120 mA drive ability; NTC thermistors input (NTC) pin for temperature qualified charged; Pre-settings battery voltage with floating plus or minus 0.6% accuracy; Thermal regulation maximize charge rate and free hot air LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. The use of constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone.
2, lithium ion/polymer battery scheme
Lithium ion/polymer battery charge scheme for different number of core, core configuration, and power types are different. At present mainly have three main charging scheme: linear, Buck (step-down) switch and SEPIC (booster and step-down) switch.
When the input voltage in big with the charger with sufficient clearance of core after opening voltage, it is linear scheme, especially 1.0 C fast charging current than 1 A big too much. For example, MP3 players usually only one core, capacity from 700 to 1500 mAh differ, full charge voltage is open 4.2 V. MP3 player power is usually the AC/DC adapter or USB interface, the output is the rule of 5 V; At this time, the linear scheme is the most simple, most charger of the efficiency of the scheme. Figure 2 shows for lithium ion/polymer battery solution linear scheme, basic structure and linear voltage neat device.
MAX8677A is double input USB/AC adapter linear charger, built-in Smart Power Selector, used for rechargeable single quarter by Li + batteries portable devices. The charger integration of the battery and the external power source and load switch charging all the power switch, so that no external MOSFET. MAX8677A ideal used in portable devices, such as smart phones, PDA, portable media players, GPS navigation equipment, digital camera, and digital cameras.
MAX8677A can work in independent USB and the power input AC adapter or two input either one of the input. When connecting external power supply, intelligent power source selector allows the system not connect battery or can and depth discharge battery connection. Intelligent power source selector will automatically switch to the battery system load, use the system did not use the input power supply parts for battery, make full use of limited USB and adapter power supply input. All the needed electric current detection circuit, including the integration of the power switch, all integration in the piece. DC input current highest limit can be adjusted to 2 A and DC and USB input all can support 100 mA, 500 mA, and USB hung mode. Charge current can be adjusted to as high as 1.5 A, thus support wide range of battery capacitive. Other features include MAX8677A thermal regulation, over-voltage protection, charging status and fault output, power supply good surveillance, battery thermistors surveillance, and charging timer. MAX8677A using save a space, hot enhanced, 4 mm x 4 mm, 24 of the pins TQFN encapsulation, regulations, work in exceptional temperature range (40 ~ + 85 ℃).
2.2 Buck (step-down) switch scheme
When A 1.0 C of the charging current more than 1 A, or the input voltage of the core than with high voltage open many, Buck or step-down plan is A better choice. For example, based on the hard drive in the PMP, often use single core lithium ion battery, the full of open is 4.2 V voltage, capacity from 1200 to 2400 mAh range. And now PMP is usually use the car kit to charge, its output voltage in a 9 V to 16 between V. In the input voltage and battery voltage is the voltage difference between high (minimum 4.8 V) will make linear scheme lowers efficiency. This kind of low efficiency, plus more than 1.2 A 1 C fast charging electric current, have serious heat dissipation problems. To avoid this kind of situation, will the Buck scheme. Figure 3 for lithium ion/polymer battery charger scheme Buck diagram, basic structure with Buck (step-down) switching voltage regulators completely the same.
2.3 SEPIC (booster and step-down) switch scheme
In some use of three or four lithium ion/polymer core series equipments, charger of the input voltage is not always greater than the battery voltage. For example, laptop computers use 3 core lithium ion battery, full charge voltage is open 12.6 V (4.2 V x3), capacity is 1800 mAh to 3600 mAh from. Power supply input or output voltage is 1 6 V AC/DC adapter, or is car kit, the output voltage in a 9 V to 16 between V. Apparently, the linear and Buck solutions are not for this group of batteries. This is about to use SEPIC scheme, it can in the output voltage is higher than when the battery voltage, can be in the output voltage less than when the battery.
3, and power detection algorithm is proposed
Many portable products use voltage measurements to estimate the remaining battery power, but the battery voltage and surplus power relationship but will with the discharge rate, temperature and battery aging degree of change, make this kind of method can top 50% margin of error. The market for longer to use product demand unceasingly strengthens, so the system design personnel need more accurate solution. Use capacity check plan come to measure battery or consumption of electricity, will be in a wide range of application power to provide more accurate estimate of the battery power.
3.1 power detection algorithm is one of the examples of application, function complete list, double the battery portable battery application design
The battery circuit description. Figure 4 (a) can be used for identification of IC functions with typical application circuit batteries. According to the use of IC testing program is different, the battery needs to have at least three to four outside the terminal.
VCC and BAT pins will even to the battery voltage, so that for, C power and the battery voltage measurement. The battery is connected a grounding resistance smaller detection resistors, let capacity check meter high impedance SRP and SRN input can monitor sensor resistance on both ends of the voltage. Through testing the current flows through a resistor can be used to judge the battery or release the amount of electricity. Designers choose detection resistance value must be considered when resistance on both ends of the voltage can't more than 100 mV, low resistance may be more hours in current errors. Circuit board layout must ensure that SRP and SRN to testing from as close as possible to the connection of the resistor sensor resistance end; In other words, they should be the Kelvin attachment.
HDQ pin need external and resistors, this resistance should be located the host or the main application, such capacity check plan to the battery and portable devices when sleep function enable connection broken. Advice and resistance choose 10 k Ω.
Once the battery through the appraisal, bq26150 will issue commands to ensure that the host and quantity test plan of material lines between normal communication. When the battery connection interruption or to connect, the whole the identification process will be repeated again.
Host to be able to read capacity check plan of variable voltage measurement battery, to make sure the end of discharging threshold and charging terminate threshold. As for the remaining state power (RemainingStateofCapacity), do not need to read can use directly.
The above bq2650x and bq27x00 etc capacity check plan provides the battery manufacturer a simple to use options, this scheme L [just measuring battery voltage to be precise, so these capacity check plan can be applied to various battery framework, and can support the battery identification and double the battery application '
3.2 power detection algorithm is an example of applications another, can apply to all kinds of general voltmeter new IC.
Today's many manufacturers can provide a variety of voltmeter IC,, the user can choose the suitable function device, to optimize the product price. Use voltmeter measurement of storage battery parameters, the separate architecture allows users in the host custom power measurement algorithm within. Eliminating embedded processor battery cost. On this to Dallase semicconductor company called cases of DS2762 chip for typical analysis. A new separate voltmeter IC, its structure see chart 5 (a) below.
DS2762 is a single quarter of lithium battery voltmeter and protection circuit, integrated into a tiny 2.46 mm x 2.74 mm inversion of packaging. Due to internal integration for power detection of high precise resistance, this device is very save a space. It is the small size and incomparable high level of integration, for mobile phone battery and other similar handheld products, such as PDA, etc, are all very ideal. Integrated protection circuit continuously monitoring the battery voltage, over voltage and flow fault (charging or discharge period). Different from the independent protection IC, DS2762 allow main processor surveillance/control protection FET conduction state, such, can DS2762 through the protection of the power system and the control circuit implementation. DS2762 can also charge a battery consumption has depth, when the battery voltage within three V, provide a limit of the charging current recovery path.
DS2762 accurate monitoring battery current, voltage and temperature, the dynamic range and resolution of common satisfy any mobile communication product testing standards. The measurement of current for internally generated when the integral, realize the power measurement. Through the real-time, continuous automatic disorders correct, the precision of power measurement can be increased. The built-in measuring resistance due to eliminate manufacturing process and temperature and cause resistance change, further improve the precision of the voltmeter. Important data stored in 32 bytes, can add the lock EEPROM; 16 bytes of SRAM are used to keep dynamic data. And DS2762 all communication all through the 1-Wire, more communication interface node, minimize the battery and the connection to the host. Its main features for; Single quarter of lithium battery protector; High precision current (power measurement), voltage and temperature measurement; Optional integrated 25 m Ω measuring resistance, each DS2762 after fine-tuning alone; 0 V battery restore charge; 32 bytes can lock EEPROM, 16 bytes SRAM, 64 a ROM;
1-Wire, node, digital communication interface; Support more battery power management, and through the protection system control FET power; Dormancy mode power supply current only 2 µ A (most); Work mode power supply current for 90 µ A (most); 2.46 mm x 2.74 mm inversion of packaging or 16 feet SSOP package led, and both are can choose with or without detection resistance; After has with e
最新はこれでいいんですか?
誰も話題にしてないので俺だけかな
reblogcount しか動いてなかったので自力で直そうと頑張ってみたが、
一応動画の再生と画像の拡大2種の3つに関しては動くようにできた
likeは使ってないのでとくに見てませんすみません
if (img[n].style.display != 'none') { click($X('./a', img[n])[0]); return stdin; } else{ click($X('./preceding-sibling::a[1]', img[n])[0]); return stdin; }
および
if (mov[n].style.display != 'none') { click($X('.//a', mov[n])[0]); return stdin; }
これは何をしてるんでしょうか?
残したままだとどうもうまくいかなかったので丸ごと削ってしまった
クリックすべき要素を直接XPath指定、にしたんだけどマズイ?
以下patchです
@include に www.tumblr.com/queue* も勝手に足してしまいました
どなたかまともにしてくださいm(__)m
--- 20101127_play_on_tumblr.user.js +++ 20110402_play_on_tumblr.user.js @@ -6,6 +6,7 @@ // @include http://www.tumblr.com/show/* // @include http://www.tumblr.com/tumblelog/* // @include http://www.tumblr.com/tagged/* +// @include http://www.tumblr.com/queue* // ==/UserScript== (function() { @@ -43,25 +44,15 @@ command: function(stdin) { try { if (!stdin.length) stdin = execute('current-node'); - var img = $X('.//div[starts-with(@id, "highres_photo")]', stdin[0]); + var img = $X('.//img[contains(@id, "thumbnail_photo_")]', stdin[0]); for (var n = 0; n < img.length; n++) { - if (img[n].style.display != 'none') { - click($X('./a', img[n])[0]); - return stdin; + click(img[n]); } - else{ - click($X('./preceding-sibling::a[1]', img[n])[0]); - return stdin; - } - } - var mov = $X('.//div[contains(@id,"watch_") and .//a]', stdin[0]); + var mov = $X('.//img[contains(@id,"video_thumbnail_")]', stdin[0]); for (var n = 0; n < mov.length; n++) { - if (mov[n].style.display != 'none') { - click($X('.//a', mov[n])[0]); - return stdin; + click(mov[n]); } - } - var timg = $X('.//img[contains(@src,"tumblr.com/tumblr_")]|.//img[@class="inline_external_image"]', stdin[0]); + var timg = $X('.//img[contains(@class, "inline_external_image")]', stdin[0]); for (var n = 0; n < timg.length; n++) { click(timg[n]); }
Deploy Merb, Sinatra, or any Rack App to Heroku
http://blog.heroku.com/archives/2009/3/5/32_deploy_merb_sinatra_or_any_rack_app_to_heroku/
http://heroku.com/pages/quickstart
HerokuをGit経由で使ってみる
http://d.hatena.ne.jp/aki-s-119/20081110/1226335713
http://github.com/guides/using-git-and-github-for-the-windows-for-newbies
http://d.hatena.ne.jp/kusakari/20080715/1216091060
http://code.google.com/p/msysgit/
http://net-newbie.com/putty.html
>heroku help === General Commands help # show this usage list # list your apps create [<name>] # create a new app keys # show your user's public keys keys:add [<path to keyfile>] # add a public key keys:remove <keyname> # remove a key by name (user@host) keys:clear # remove all keys === App Commands (execute inside a checkout directory) info # show app info, like web url and git repo open # open the app in a web browser rename <newname> # rename the app sharing:add <email> # add a collaborator sharing:remove <email> # remove a collaborator domains:add <domain> # add a custom domain name domains:remove <domain> # remove a custom domain name domains:clear # remove all custom domains rake <command> # remotely execute a rake command console <command> # remotely execute a single console command console # start an interactive console to the remote restart # restart app servers logs # fetch recent log output for debugging logs:cron # fetch cron log output bundles # list bundles for the app bundles:capture [<bundle>] # capture a bundle of the app's code and dat bundles:download # download most recent app bundle as a tarba bundles:download <bundle> # download the named bundle bundles:animate <bundle> # animate a bundle into a new app bundles:destroy <bundle> # destroy the named bundle destroy # destroy the app permanently === Example story: rails myapp cd myapp (...make edits...) git init git add . git commit -m "my new app" heroku create myapp git remote add heroku git@heroku.com:myapp.git git push heroku master
これでおしまいだよ
(require 'cl) ; for cl-seq (defvar sangels-movies-dir nil) (defvar sangels-player "c:/Program Files/GRETECH/GomPlayer/GOM.exe") (defvar sangels-sort-by 'sangels-sort-by-rate) (defvar sangels-rate-file "~/.emacs.d/.sangels/rate") (defvar sangels-buffer "*sangels*") (defvar sangels-thumbnail "00_thumbnail.jpg") (defvar sangels-m3u "00_movies.m3u") (defface sangels-name '((t (:family "fixed" :weight bold :height 3.0))) "") (defface sangels-rate '((t (:family "fixed" :weight bold :height 1.5))) "") (defvar sangels-mode-map (let ((map (make-sparse-keymap))) (define-key map "n" 'next-line) (define-key map "p" 'previous-line) (define-key map (kbd "RET") 'sangels-select) (define-key map (kbd "SPC") 'sangels-select) (define-key map "q" 'sangels-quit) (define-key map "+" 'sangels-rate-plus) (define-key map "-" 'sangels-rate-minus) map)) (defvar sangels-mode-hook nil) (defvar sangels-highlight-overlay nil) (defvar sangels-rate-alist nil) (defconst sangels-rate-max 6) (defun sangels-insert-movies () (save-excursion (let* ((inhibit-read-only t) (files (remove-if-not (lambda (x) (and (not (member (file-name-nondirectory x) '("." ".."))) (file-directory-p x) (member sangels-thumbnail (directory-files x)))) (directory-files sangels-movies-dir t))) (ids (mapcar 'file-name-nondirectory files))) (erase-buffer) (setq ids (sangels-sort-ids ids)) (dolist (id ids) (let ((file (expand-file-name id sangels-movies-dir)) (pos (point))) (insert-image-file (expand-file-name sangels-thumbnail file)) (end-of-line) (insert (propertize (format "%-15s " id) 'face 'sangels-name)) (sangels-insert-rate id) (insert "\n") (put-text-property pos (point) 'sangels-id id)))))) (defun sangels-sort-by-name (a b) (string< a b)) (defun sangels-sort-by-rate (a b) (or (> (sangels-rate a) (sangels-rate b)) (sangels-sort-by-name a b))) (defun sangels-sort-ids (ids) (sort ids (or sangels-sort-by 'sangels-sort-by-name))) (defun sangels-insert-rate (id) (let ((rate (sangels-rate id))) (insert (propertize (concat (make-string rate ?★) (make-string (- sangels-rate-max rate) ?☆)) 'sangels-rate t 'face 'sangels-rate)))) (defun sangels-current-id () (get-text-property (point) 'sangels-id)) (defun sangels-play-movie (movie) (let ((explicit-shell-file-name "cmdproxy") (shell-file-name "cmdproxy")) (apply 'call-process-shell-command "start" nil "*tmp*" nil (mapcar (lambda (x) (concat "\"" x "\"")) (list sangels-player (unix-to-dos-filename movie)))))) (defun sangels-select () (interactive) (let ((id (sangels-current-id))) (when id (sangels-play-movie (expand-file-name sangels-m3u (expand-file-name id sangels-movies-dir)))))) (defun sangels-quit () (interactive) (kill-buffer sangels-buffer)) (defun sangels-rate (id) (or (cdr (assoc id sangels-rate-alist)) (/ sangels-rate-max 2))) (defun sangels-rate-save () (interactive) (let ((dir (file-name-directory sangels-rate-file))) (unless (file-exists-p dir) (make-directory dir t))) (with-temp-file sangels-rate-file (insert (pp-to-string sangels-rate-alist)))) (defun sangels-rate-load () (interactive) (when (file-exists-p sangels-rate-file) (with-temp-buffer (insert-file-contents sangels-rate-file) (goto-char (point-min)) (setq sangels-rate-alist (read (current-buffer)))))) (defun sangels-rate-plus (&optional n) (interactive "p") (setq n (or n 1)) (let* ((id (sangels-current-id)) (cell (assoc id sangels-rate-alist))) (unless cell (setq cell (cons id (sangels-rate id))) (setq sangels-rate-alist (cons cell sangels-rate-alist))) (setcdr cell (+ (cdr cell) n)) (save-excursion (let ((inhibit-read-only t)) (beginning-of-line) (goto-char (next-single-property-change (point) 'sangels-rate)) (delete-region (point) (next-single-property-change (point) 'sangels-rate)) (sangels-insert-rate id))) (sangels-rate-save))) (defun sangels-rate-minus (&optional n) (interactive "p") (setq n (or n -1)) (sangels-rate-plus (- n))) (defun sangels-post-command-hook () (save-excursion (move-overlay sangels-highlight-overlay (progn (move-beginning-of-line 1) (point)) (progn (move-end-of-line 1) (forward-line) (point)) (current-buffer)))) (defun sangels-mode () (interactive) (kill-all-local-variables) (use-local-map sangels-mode-map) (setq sangels-highlight-overlay (make-overlay 0 0)) (overlay-put sangels-highlight-overlay 'face 'highlight) (overlay-put sangels-highlight-overlay 'evaporate t) (make-local-variable 'post-command-hook) (add-hook 'post-command-hook 'sangels-post-command-hook nil t) (setq major-mode 'sangels-mode) (setq mode-name "Sangels") (run-mode-hooks 'sangels-mode-hook) (set-buffer-modified-p nil) (setq buffer-read-only t)) (defun sangels (&optional arg) (interactive "P") (when (or arg (not sangels-movies-dir)) (setq sangels-movies-dir (read-directory-name "movies dir: "))) (sangels-rate-load) (switch-to-buffer (get-buffer-create sangels-buffer)) (sangels-insert-movies) (sangels-mode)) (provide 'sangels)
Table of Contents: ||||||
オープンソースソフトウェアとGIS | Open Source software and GIS | Open Source software and GIS | 1 (6) |
オープンソース概念 | Open Source concept | 1 (2) | |
オープンソースGISとしてのGRASS | GRASS as an Open Source GIS | 3 (2) | |
ノースカロライナサンプルデータセット | The North Carolina sample data set | 5 (1) | |
この本の読み方 | How to read this book | 5 (2) | |
GISの概念 | GIS concepts | GIS concepts | 7 (14) |
一般的なGISの原理 | General GIS principles | 7 (6) | |
地理空間データモデル | Geospatial data models | 7 (4) | |
GISデータとシステムの構成 | Organization of GIS data and system | 11 (2) | |
機能 | functionality | ||
地図投影法と座標系 | Map projections and coordinate systems | 13 (8) | |
地図投影原理 | Map projection principles | 13 (3) | |
一般的な座標系とdatums | Common coordinate systems and datums | 16 (5) | |
GRASSをはじめよう | Getting started with GRASS | Getting started with GRASS | 21 (32) |
第一歩 | First steps | 21 (16) | |
GRASSのダウンロードとインストール | Download and install GRASS | 21 (2) | |
データベースとコマンドの構造 | Database and command structure | 23 (3) | |
GRASS6のためのグラフィカルユーザインタフェイス: | Graphical User Interfaces for GRASS 6: | 26 (1) | |
QGISとgis.m | QGIS and gis.m | ||
ノースカロライナを用いてGRASSを開始 | Starting GRASS with the North Carolina | 27 (3) | |
データセット | data set | ||
GRASSデータ・ディスプレイと3D可視化 | GRASS data display and 3D visualization | 30 (4) | |
プロジェクトデータ管理 | Project data management | 34 (3) | |
新しいプロジェクトでGRASSを開始 | Starting GRASS with a new project | 37 (7) | |
aのための座標系の定義 | Defining the coordinate system for a | 40 (4) | |
新しいプロジェクト | new project | ||
空間投影されていないxy座標系 | Non-georeferenced xy coordinate system | 44 (1) | |
座標系の変換 | Coordinate system transformations | 44 (9) | |
座標系のリスト | Coordinate lists | 45 (2) | |
ラスタとベクトル地図の投影 | Projection of raster and vector maps | 47 (1) | |
GDAL/OGRツールで、再投影 | Reprojecting with GDAL/OGR tools | 48 (5) | |
GRASSデータモデルとデータの交換 | GRASS data models and data exchange | 53 (30) | |
ラスターデータ | Raster data | 54 (16) | |
GRASSの2Dの、3Dのラスターデータモデル | GRASS 2D and 3D raster data models | 54 (2) | |
領域の統合と境界 | Managing regions and boundaries | raster map resolution | |
ジオコードされたラスターデータのインポート | Import of georeferenced raster data | 58 (8) | |
スキャンされた歴史的地図のインポートとジオコーディング | Import and geocoding of a scanned | 66 (3) | |
ラスターデータエクスポート | Raster data export | 69 (1) | |
ベクトルデータ | Vector data | 70 (13) | |
GRASSベクトルデータモデル | GRASS vector data model | 70 (3) | |
ベクトルデータのインポート | Import of vector data | 73 (5) | |
xy CAD描画のための座標変換 | Coordinate transformation for xy CAD drawings | 78 (2) | |
ベクトルデータのエクスポート | Export of vector data | 80 (3) | |
ラスターデータを使う | Working with raster data | 83 (86) | |
ラスター地図を表示、管理 | Viewing and managing raster maps | 83 (22) | |
ラスターデータの表示と、カラーテーブルの割り当て | Displaying raster data and assigning a color table | 83 (3) | |
ラスター地図に関するメタデータを管理 | Managing metadata of raster maps | 86 (2) | |
ラスター地図のクエリとプロファイル | Raster map queries and profiles | 88 (2) | |
ラスター地図の統計 | Raster map statistics | 90 (1) | |
ラスター地図のズームと、部分集合の生成 | Zooming and generating subsets from | 91 (1) | |
簡単なラスター地図の生成 | Generating simple raster maps | 92 (2) | |
再分類と再スケーリング | Reclassification and rescaling of | 94 (3) | |
ラスター地図 | raster maps | ||
ラスター地図タイプの記録と値の置換 | Recoding of raster map types and value replacements | 97 (2) | |
カテゴリラベルの割り当て | Assigning category labels | 99 (4) | |
マスキングとノーデータ値の取り扱い | Masking and handling of no-data values | 103(2) | |
ラスター地図の計算 | Raster map algebra | 105(10) | |
整数と浮動小数点データ | Integer and floating point data | 107(1) | |
基本的な計算 | Basic calculations | 108(1) | |
“if"状態を使う | Working with ``if'' conditions | 109(1) | |
r.mapcalcのNULL値の取り扱い | Handling of NULL values in r.mapcalc | 110(1) | |
r.mapcalcでMASKを作成 | Creating a MASK with r.mapcalc | 111(1) | |
特別なグラフ演算子 | Special graph operators | 112(1) | |
相対的座標での近傍演算 | Neighborhood operations with relative coordinates | 113(2) | |
ラスタデータの変換と内挿 | Raster data transformation and interpolation | 115(11) | |
離散的ラスターデータの自動的ベクトル化 | Automated vectorization of discrete raster data | 115(3) | |
連続フィールドの等値線の描画を生成 | Generating isolines representing continuous fields | 118(1) | |
ラスタデータのリサンプリングと内挿 | Resampling and interpolation of raster data | 119(5) | |
ラスター地図のオーバーレイとマージ | Overlaying and merging raster maps | 124(2) | |
ラスターデータの空間分析 | Spatial analysis with raster data | 126(29) | |
近傍分析とクロスカテゴリー統計 | Neighborhood analysis and cross-category statistics | 126(7) | |
ラスタフィーチャのバッファリング | Buffering of raster features | 133(2) | |
コストサーフェイス | Cost surfaces | 135(5) | |
地勢と分水界分析 | Terrain and watershed analysis | 140(13) | |
ランドスケープ構造解析 | Landscape structure analysis | 153(2) | |
ランドスケーププロセスモデリング | Landscape process modeling | 155(11) | |
水文学的、地下水のモデル | Hydrologic and groundwater modeling | 155(3) | |
浸食と宣誓証言モデル | Erosion and deposition modeling | 158(8) | |
ラスタベースのモデルと解析に関するまとめ | Final note on raster-based modeling and analysis | 166(1) | |
ボクセルデータを使う | Working with voxel data | 166(3) | |
ベクトルデータを使う | Working with vector data | 169(94) | |
地図の表示とメタデータ管理 | Map viewing and metadata management | 169(4) | |
ベクトル地図を表示 | Displaying vector maps | 169(3) | |
ベクトル地図メタデータ維持 | Vector map metadata maintenance | 172(1) | |
ベクトル地図属性管理とSQLのサポート | Vector map attribute management and SQL support | 173(14) | |
GRASS6でのSQLサポート | SQL support in GRASS 6 | 174(7) | |
サンプルSQLクエリと属性変更 | Sample SQL queries and attribute modifications | 181(4) | |
地図再分類 | Map reclassification | 185(1) | |
複数の属性があるベクトル地図 | Vector map with multiple attribute tables: layers | 186(1) | |
ベクトルデータをデジタル化 | Digitizing vector data | 187(5) | |
位相的データのデジタル化の一般原理 | General principles for digitizing topological data | 187(2) | |
GRASSでの対話的なデジタイジング | Interactive digitizing in GRASS | 189(3) | |
ベクトル地図クエリと統計 | Vector map queries and statistics | 192(4) | |
地図のクエリ | Map queries | 192(2) | |
ベクトルオブジェクトに基づくラスター地図統計 | Raster map statistics based on vector objects | 194(2) | |
ポイントベクトル地図統計 | Point vector map statistics | 196(1) | |
幾何学操作 | Geometry operations | 196(20) | |
位相的な操作 | Topological operations | 197(6) | |
バッファリング | Buffering | 203(1) | |
フィーチャの抽出と境界のディゾルブ | Feature extraction and boundary dissolving | 204(1) | |
ベクトル地図を修理 | Patching vector maps | 205(1) | |
ベクトル地図のインターセクディングとクリッピング | Intersecting and clipping vector maps | 206(3) | |
ベクトルの幾何の変換と3Dベクトルの作成 | Transforming vector geometry and creating 3D vectors | 209(2) | |
点からのコンベックスハルとトライアンギュレーション | Convex hull and triangulation from points | 211(1) | |
同じ位置の掘り出し物の複数のポイント | Find multiple points in same location | 212(2) | |
一般的な多角形境界の長さ | Length of common polygon boundaries | 214(2) | |
ベクトルネットワーク分析 | Vector network analysis | 216(11) | |
ネットワーク分析 | Network analysis | 216(5) | |
直線的な参照システム(LRS) | Linear reference system (LRS) | 221(6) | |
ラスタへのベクトルデータ変化 | Vector data transformations to raster | 227(3) | |
空間的な内挿と近似 | Spatial interpolation and approximation | 230(19) | |
内挿方法を選択 | Selecting an interpolation method | 230(5) | |
RSTによる内挿と近似 | Interpolation and approximation with RST | 235(2) | |
RSTパラメタの調整: テンションとスムージング | Tuning the RST parameters: tension and smoothing | 237(4) | |
RSTの精度を評価 | Estimating RST accuracy | 241(3) | |
セグメント化処理 | Segmented processing | 244(3) | |
RSTとのトポグラフィー分析 | Topographic analysis with RST | 247(2) | |
ライダーポイントのクラウドデータを使う | Working with lidar point cloud data | 249(8) | |
ボリュームに基づくは内挿 | Volume based interpolation | 257(6) | |
3番目の変数の追加: 高度のある降水量 | Adding third variable: precipitation with elevation | 258(3) | |
ボリュームとボリューム-時間内挿 | Volume and volume-temporal interpolation | 261(1) | |
地球統計学とスプライン | Geostatistics and splines | 262(1) |
ほんとにもう最高。
楽したい人間+ハマり性な人間には、こーゆーカスタマイズがしがし出来るツールが最高なのよ。
エディタならvim。emacsでもいいけど、あんまり詳しくない。
他のツールはカスタマイズ性で見劣りする。
こだわりのない人間にはどんなツールでもオッケーなんだろうね。
オレはこだわるところはこだわる。
ちょっとした不便に気づかないか気づいても甘受してしまうような人間と、今はクリアできなくともなんとか今後の課題にしたいと考える人間。
そこの違いだね。
どっちが得かというのはわからんけどね。
優劣とか損得の問題じゃなく、ただオレはそういう人種だってこと。
追記
vimperatorrcねえ。特筆すべき点はないけど、あえて一部抜粋すれば、こんな感じ。
inoremap <C-1> <Esc>1gt inoremap <C-2> <Esc>2gt inoremap <C-3> <Esc>3gt inoremap <C-4> <Esc>4gt inoremap <C-5> <Esc>5gt inoremap <C-6> <Esc>6gt inoremap <C-7> <Esc>7gt inoremap <C-8> <Esc>8gt inoremap <C-9> <Esc>9gt noremap <BS> H noremap <S-BS> L noremap ,b <Esc>:bmarks -tags= noremap u :o<Space> " ldrc+ldrでoで:open出来ない問題を解決
" wildoptions=auto時に一瞬補完が表示されてウザいmapがある - Dis Communication - 符号無し " http://unsigned.g.hatena.ne.jp/Trapezoid/20080620/1213961754 javascript <<EOM [ [',a',':dialog addbookmark'], [',c',':viewSBMComments -t h'], [',C',':viewSBMComments -t hdl'], [',d',':pindownload'], [',ld',':set ldrc'], [',p',':mb clear-pin'], [',q',':toggleldrc'], [',R',':so ~/_vimperatorrc'], [',r',':res'], [',v',':!vim ~/_vimperatorrc'], ['\\s',':scrapbook'], ['\\S',':scrap'], ['\\f',':firebug'], ['\\d',':dialog downloads'], ['\\p',':tabopen chrome://browser/content/places/places.xul'], ['!',':set invum'], ['B',':ls!'], ['\\a',':addons'], ['\\e',':errorconsole'], ['\\F',':firebugwindow'], ['\\d',':dialog downloads'], ['\\g',':oepnGMpanel'], ['\\G',':toggleGM'], ['e',':note'], ['<F11>',':fullscreen'], ['\\P',':placesnewwin'], ['\\H',':historynewwin'], ['<C-j>',':togglebookmarksidebar'], ['<C-k>',':togglehistorysidebar'], ['<C-l>',':addtoldr'], ['<C-S-Right>',':removerighttabs'], ['<C-S-Tab>',':previousfirebugtab'], [',o',':openselectedlinks'], [',3',':copy titleAndURL'], [',ig',':imageGet'], [',io',':imageOpen'], ['w',':submit'], [',lo',':logout'], // nicontroller.js [',ni',':nicoinfo'], [',np',':nicopause'], [',nm',':nicomute'], [',nv',':nicommentvisible'], [',nz',':nicosize'], [',ns',':nicoseek'], ].forEach(function([key,command]){ liberator.mappings.addUserMap([liberator.modes.NORMAL], [key], "User defined mapping", function () { liberator.execute(command); }, {rhs: key, noremap: true}); }); EOM javascript <<EOM [ ['<C-j>',':togglebookmarksidebar'], ['<C-k>',':togglehistorysidebar'], ].forEach(function([key,command]){ liberator.mappings.addUserMap([liberator.modes.INSERT], [key], "User defined mapping", function () { liberator.execute(command); }, {rhs: key, noremap: true}); }); EOM
javascript <<EOM // nicontroller.js plugin // [N]- // N 秒前にシークする。 // 指定なしの場合 10 秒前。 liberator.mappings.addUserMap( [liberator.modes.NORMAL], ['-'], 'seek by count backward', function(count) { if(count === -1) count = 10; liberator.execute(':nicoseek! ' + '-' + count); }, { flags: liberator.Mappings.flags.COUNT } ); // [N]+ // N 秒後にシークする。 // 指定なしの場合 10 秒後。 liberator.mappings.addUserMap( [liberator.modes.NORMAL], ['+'], 'seek by count forward', function(count) { if(count === -1) count = 10; liberator.execute(':nicoseek! ' + count); }, { flags: liberator.Mappings.flags.COUNT } ); EOM
Vimperatorで;bでリンクを新しいバックグラウンドのタブに開くようにする。
http://anond.hatelabo.jp/20080709195527
も俺の仕業なんだけど、これvimperator本体に実装してくれないかな。
気になる点・これからの課題
窓の杜 - 【NEWS】Firefox 3のスマートロケーションバーに対応した「XUL/Migemo」
http://www.forest.impress.co.jp/article/2008/07/07/xulmigemo0105.html
余談
Index of /
http://vimperator.driftaway.org/
に上がるのはたいてい朝の07:30になっているので、いつからかチェックするのが朝の習慣になった。
今回の Windows では関連付けが関連付けしか出来なくなるなどカスタマイズ周辺機能の劣化が甚大この上なく、レジストリを直接変更する他に手がないらしい。
ですので、 regedit で HKEY_CLASSES_ROOT\htmlfile\shell\Edit\command の既定値を編集。 "full path" "%1" で、full path部分にはエディタのフルパスを書くとよいですね。
また、 Ver7 にもなってソース表示エディタに notepad を採用しているブラウザを改善する為にも、インターネットオプションの HTML エディタを変更します。
該当するレジストリキーが無いなどの理由(推測)でなぜか変更されない場合は HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name の既定値を "full path" にします。よかったですね。