2011/12/29

msys git single file history

In Git BASH
gitk -- path/to/file &

Or right click on file
Then click "Git History"

BTW...
Not only file, files in folders also do.

2011/12/26

net snmp 尋找 mib tree

先看 net snmp
把mib檔設定一下 然後載入mib檔

找名字含有ssl的snmp oid
snmptranslate -TB '.*ssl.*'

http://www.net-snmp.org/wiki/index.php/TUT:snmptranslate 看來的...

2011/12/13

html encode/decode using javascript

  1. String.prototype.encodeHTML = function() { var d=document.createElement("div");(d.textContent)?(d.textContent=this):d.innerText=this;return d.innerHTML };
  2. String.prototype.decodeHTML = function() { var d=document.createElement("div");d.innerHTML=this;return d.innerText||d.textContent };