Tuesday, November 09, 2010

Handle JSON.parse in IE 6

IE 6 seems can not recognize JSON.parse(), there's many way to fix this, one is to use the json2 library, http://json.org/json2.js, just include the file in your document, then you will be able to use JSON.parse() or JSON.stringify() .

More details take a look at this post: http://stackoverflow.com/questions/1787020/json-object-in-ie6-how

Friday, July 30, 2010

CSS3 PIE on IE8 non-senseness

If you having issue on rendering CSS3 property on IE8 using CSS3 PIE, chance are you have to set the element position to relative, otherwise the element may be disappeared.

Tuesday, May 11, 2010

Element weight in css

Never know this before, when css is rendering for a page, it actually calculating point to determine override rule.

HTML = 1 point
CLASS = 10 points
ID = 100 points

More on: http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-understanding-css-specificity/

Make html5 element available in IE

First make all new element as block element in css, Second, in javascript, using Document.createElement("name of the new element") to create all new elements.
This way can trick IE to understand these element.
You may also embed a html5.js host by google that can do that for you.

Thursday, January 07, 2010

Magic line to create file in nest structure

mkdir -p `dirname parentFolder/childFolder/file.txt` && touch parentFolder/childFolder/file.txt

Finding video info from command line

sudo apt-get install libimage-exiftool-perl
exiftool *.mp4 *.mpg *avi *mov