<?xml version="1.0" encoding="utf-8" ?>


<?xml-stylesheet href="/secondlife/rssxsl" type="text/xsl" media="screen"?>


<rdf:RDF
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xml:lang="ja">
<channel rdf:about="http://subtech.g.hatena.ne.jp/secondlife/rss">
	<title>微熱 everyday</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/</link>
	<description>微熱 everyday</description>

	<dc:creator>secondlife</dc:creator>
	<items>
	<rdf:Seq>
		<rdf:li rdf:resource="http://subtech.g.hatena.ne.jp/secondlife/20100205/1265358186"/>
		<rdf:li rdf:resource="http://subtech.g.hatena.ne.jp/secondlife/20100126/1264487474"/>
		<rdf:li rdf:resource="http://subtech.g.hatena.ne.jp/secondlife/20100113/1263390298"/>
		<rdf:li rdf:resource="http://subtech.g.hatena.ne.jp/secondlife/20091228/1262002097"/>
		<rdf:li rdf:resource="http://subtech.g.hatena.ne.jp/secondlife/20091228/1262001989"/>
	</rdf:Seq>
	</items>
</channel>
<item rdf:about="http://subtech.g.hatena.ne.jp/secondlife/20100205/1265358186">
	<title>Firefox アドオンの BarTap が life changing な件</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/20100205/1265358186</link>
	<description> 久しぶりにこれは！と思った addon なので紹介。 https://addons.mozilla.org/ja/firefox/addon/67651 タブを大量に開いているとFirefoxを起動する度に大量の読み込みが発生するのでFirefoxの再起動が億劫に</description>

	<content:encoded><![CDATA[
		<div class="section">
			<p>久しぶりにこれは！と思った addon なので紹介。</p>
			<ul>
				<li> <a href="https://addons.mozilla.org/ja/firefox/addon/67651" target="_blank">https://addons.mozilla.org/ja/firefox/addon/67651</a></li>
			</ul>
			<blockquote title="https://addons.mozilla.org/ja/firefox/collection/piro_favorites" cite="https://addons.mozilla.org/ja/firefox/collection/piro_favorites">
			<p>タブを大量に開いているとFirefoxを起動する度に大量の読み込みが発生するのでFirefoxの再起動が億劫になってしまうけれども、これがあれば最低限のタブだけ読み込んでくれるので安心です。ツリー型タブとの共存も可能。</p>
			<cite><a href="https://addons.mozilla.org/ja/firefox/collection/piro_favorites" target="_blank">https://addons.mozilla.org/ja/firefox/collection/piro_favorites</a></cite></blockquote>
			<p>と piro たんが紹介してるように、Firefox をタブ開きまくりで再起動＞タブロードが一気に数十個走る && basic 認証のダイアログでまくる(マスターパスワード使ってると防げない)でムカーというのが無くなって超快適に！piro++, philiKON++</p>
			<p>vimperator 使ってれば、要らないタブ消して落ち着いた頃に :reloadall すれば全タブロードを後にできるし快適。</p>
		</div>
]]></content:encoded>

	<dc:creator>secondlife</dc:creator>
	<dc:date>2010-02-05T17:23:06+09:00</dc:date>
</item>
<item rdf:about="http://subtech.g.hatena.ne.jp/secondlife/20100126/1264487474">
	<title>Firefox 3.6 + Vimp 2.2 で yy すると utf8 が URL エンコードされずコピーされてしまう</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/20100126/1264487474</link>
	<description> ので、前のような挙動に戻したかったけど、ツイート(甘)したところ @anekos さんと @teramako さんが教えてくれた！ありがとうございます！ teramako copy.js を使っているならば :copy! buffer.URL でい</description>

	<content:encoded><![CDATA[
		<div class="section">
			<p>ので、前のような挙動に戻したかったけど、ツイート(甘)したところ @anekos さんと @teramako さんが教えてくれた！ありがとうございます！</p>
<pre>
teramako
 copy.js を使っているならば :copy! buffer.URL でいけますよー
</pre>

<pre>
anekos  
 :js util.copyToClipboard(buffer.URL) でいけます。
</pre>

			<p>というわけで、vimperatorrc に以下を追加して解決！</p>
<pre>
&#34; Yank での URL コピー時にマルチバイトを URL エンコードしたものにする
noremap yy :javascript util.copyToClipboard(buffer.URL);&#60;CR&#62;
</pre>

		</div>
]]></content:encoded>

	<dc:creator>secondlife</dc:creator>
	<dc:date>2010-01-26T15:31:14+09:00</dc:date>
</item>
<item rdf:about="http://subtech.g.hatena.ne.jp/secondlife/20100113/1263390298">
	<title>Ruby の Object#hash</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/20100113/1263390298</link>
	<description> nil.hash したら 4 だったので調べてみた。 $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) &#91;i486-linux] puts ObjectSpace._id2ref(0) #=&#62; false puts ObjectSpace._id2ref(1) #=&#62; 0 puts ObjectSpace._id2ref(2) #=&#62; true puts </description>

	<content:encoded><![CDATA[
		<div class="section">
			<p>nil.hash したら 4 だったので調べてみた。</p>
<pre>
$ ruby --version
ruby 1.8.7 (2009-06-12 patchlevel 174) &#91;i486-linux]

puts ObjectSpace._id2ref(0) #=&#62; false
puts ObjectSpace._id2ref(1) #=&#62; 0
puts ObjectSpace._id2ref(2) #=&#62; true
puts ObjectSpace._id2ref(3) #=&#62; 1
puts ObjectSpace._id2ref(4) #=&#62; nil
puts ObjectSpace._id2ref(5) #=&#62; 2
puts ObjectSpace._id2ref(6) #=&#62; foo.rb:8:in `_id2ref&#39;: 0x6 is not id value (RangeError)
</pre>

			<p>5まではあり、6,7,8は RangeError で<ins>追記・7は3でした</ins></p>
<pre>
puts ObjectSpace._id2ref(9) #=&#62; 4
</pre>

			<p>になるのが解らない…。</p>
			<p>あと jruby 1.4 では結果が違った。</p>
<pre>
$ jruby --version
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2010-01-11 6586) (Java HotSpot(TM) Client VM 1.6.0_17) &#91;i386-java]

puts ObjectSpace._id2ref(0) #=&#62; false
puts ObjectSpace._id2ref(1) #=&#62; 0
puts ObjectSpace._id2ref(2) #=&#62; true
puts ObjectSpace._id2ref(3) #=&#62; 1
puts ObjectSpace._id2ref(4) #=&#62; nil
puts ObjectSpace._id2ref(5) #=&#62; 2
puts ObjectSpace._id2ref(6) #=&#62; nil
</pre>

		</div>
]]></content:encoded>

	<dc:creator>secondlife</dc:creator>
	<dc:date>2010-01-13T22:44:58+09:00</dc:date>
</item>
<item rdf:about="http://subtech.g.hatena.ne.jp/secondlife/20091228/1262002097">
	<title>AutoPatchWork で継ぎ足したエントリーにはてなスターを追加する Chrome Extentions</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/20091228/1262002097</link>
	<description> https://chrome.google.com/extensions/detail/nkocajopcmdiefolkkiaokbonmhlcbhm Q: UserScript で良かったのでは？ A: 僕もそう思います。 あわせてよみたいかもしれない: Google Chrome の content script で、UnsafeWindow 的な</description>

	<content:encoded><![CDATA[
		<div class="section">
			<ul>
				<li> <a href="https://chrome.google.com/extensions/detail/nkocajopcmdiefolkkiaokbonmhlcbhm" target="_blank">https://chrome.google.com/extensions/detail/nkocajopcmdiefolkkiaokbonmhlcbhm</a></li>
			</ul>
			<blockquote>
			<p>Q: UserScript で良かったのでは？</p>
			<p>A: 僕もそう思います。</p>
			</blockquote>
			<p>あわせてよみたいかもしれない: <a href="http://subtech.g.hatena.ne.jp/secondlife/20091228/1262001989" target="_blank">Google Chrome の content script で、UnsafeWindow 的な空間でコードを実行 - 微熱 everyday - subtech</a></p>
		</div>
]]></content:encoded>

	<dc:creator>secondlife</dc:creator>
	<dc:date>2009-12-28T21:08:17+09:00</dc:date>
</item>
<item rdf:about="http://subtech.g.hatena.ne.jp/secondlife/20091228/1262001989">
	<title>Google Chrome の content script で、UnsafeWindow 的な空間でコードを実行</title>
	<link>http://subtech.g.hatena.ne.jp/secondlife/20091228/1262001989</link>
	<description> var executeBrowserContext = function(funcOrString) { var code = &quot;javascript:(&quot; + encodeURIComponent(funcOrString.toString()) + &quot;)();&quot;; location.href = code; } とか書いておけば executeBrowserContext(function() { alert(Hatena); </description>

	<content:encoded><![CDATA[
		<div class="section">
<pre class="syntax-highlight">
<span class="synIdentifier">var</span> executeBrowserContext = <span class="synIdentifier">function</span>(funcOrString) <span class="synIdentifier">{</span>
    <span class="synIdentifier">var</span> code = <span class="synConstant">&quot;javascript:(&quot;</span> + encodeURIComponent(funcOrString.toString()) + <span class="synConstant">&quot;)();&quot;</span>;
    <span class="synStatement">location</span>.href = code;
<span class="synIdentifier">}</span>
</pre>

			<p>とか書いておけば</p>
<pre class="syntax-highlight">
executeBrowserContext(<span class="synIdentifier">function</span>() <span class="synIdentifier">{</span>
    <span class="synStatement">alert</span>(Hatena);
<span class="synIdentifier">}</span>);
</pre>

			<p>と実行できる。もちろん、Fuction を toString してるだけなので、コンテキストは UnsafeWindow 的なユーザが閲覧しているページの空間となる。最初 Fuction#toString() で整形されるのって Firefox だけでしょ？っておもってベタに文字列を書いていたらチョさんにできるよといわれたのでためしたら普通にできた。</p>
			<p>これ以外にも script タグを作って挿入する方法がある。</p>
			<ul>
				<li> <a href="http://groups.google.com/group/chromium-extensions-japan/msg/d4828922d4450b3b" target="_blank">http://groups.google.com/group/chromium-extensions-japan/msg/d4828922d4450b3b</a></li>
			</ul>

		</div>
]]></content:encoded>

	<dc:creator>secondlife</dc:creator>
	<dc:date>2009-12-28T21:06:29+09:00</dc:date>
</item>
</rdf:RDF>
