December 2008
6 posts
incl.js - 外部HTMLをインクルード
下のページを参考に、外部のHTMLファイルをインクルードするJavaScriptを書いた。
静的HTMLで、インクルードを実現するためのJavaScript
前回のtmpl.jsのzipに同梱した。
tmpl.zip
incl.jsは、<include>というタグで指定したファイルを読み込む。
<include id='file.html'></include>
<script type='text/javascript' src='incl.js'></script>
ファイルが読み込まれた後は次のようになる。
<div id='file'>file.htmlの内容</div>
<script type='text/javascript'...
tmpl.js - JavaScript template system
I added a few features to very simple template system which is posted on previous entry.
tmpl.zip
The additional features are
language selection (you can specify language in a parameter, like lang=ja)
display warning (if you add debug=1 as a parameter, display missing placeholders)
These features are very very niche, I think. I’m not sure if there are needs except myself…
tmpl.js - JavaScript テンプレートシステム
1つ前のエントリに書いた、すごく単純なテンプレートスクリプトにいくつか機能を追加した。
tmpl.zip
追加したのは、
言語の指定ができるように(パラメータをlang=jaとすると、それ用の定義を使う)
HTMLに指定してないプレースホルダがあったときに警告する(パラメータにdebug=1をつける)
の2つ。すごくニッチな機能なので、自分以外にニーズがあるのかわからないけど。
Damn Small JavaScript Template
I was thinking that it’s useful if there is a small template system which just replaces placeholder by certain strings. So I looked around some websites, but most of them are too much for it. I just want to use something when I customize a template for my own blog or website. So I don’t want ‘if’ or loop or some other functionalities on a template script.
RND looks much...
DHCP client conf for local DNS on Ubuntu
You can set up virtual server on ubuntu as well as this article for OSX. But you need to add following line to /etc/dhcp3/dhclient.conf when you use DHCP in your network configuration.
prepend domain-nameservers 127.0.0.1
Otherwise /etc/resolve.conf will be updated by DHCP client and local DNS would be ignored.
Mac OSX にインストールしてるソフト 2008
ユーティリティー
StartupSound.prefPane - 起動時の音を鳴らさない
Quick Siliver - ランチャー。Extra Scriptsを有効にして、QS呼び出し -> ‘sh’ と打ってシャットダウンするのが楽
Witch - アクティブなウィンドウを切り替える。Windows の Alt + Tab と同じ
AntiRSI - 定期的にアラート。目を休めるために
ShowOff Widget - dashboard に uptime を表示
SIMBL - プラグイン用拡張機能?
Transmission - BitTorrentクライアント
The Unarchiver - 解凍ソフト
ブラウザ関連
Safari
SafariPlus - 指定の cookie 以外の...