Changing qTip2 width

It took me a while to find this out. If you need to change the default max width of qTip2, here is how. First set up a new style class. .my_width_setting_class { max-width: 1200px; min-width: 0px; } Then in the qtip style attribute, insert our newly created css class. style: { classes: 'ui-tooltip-wiki ui-tooltip-light ui-tooltip-shadow my_width_setting_class' } That will then override the default settings in jquery.qtip.css. ref: http://craigsworks.com/projects/qtip2/tutorials/styling/#dimensions ...

May 22, 2012 · 1 min · birdchan

Adding shadow to wp-codebox

Too bad wp-codebox contains two divs namely wp_codebox_msgheader and wp_codebox, we cannot simply give the box-shadow to one single div. After playing with this a bit, here is my parameters. The css file is located at /your-wp-root/wp-content/plugins/wp-codebox/css/codebox.css. .wp_codebox_msgheader { box-shadow: 6px 14px 11px #808083; } .wp_codebox { box-shadow: 7px 10px 10px #888; } The overlapped area seems smooth with this setting. I also added bottom margin to the codebox, see if you like it. ...

May 19, 2012 · 1 min · birdchan

Installing Ruby on Rails in osx

Install Xcode first. You will need the one from the Mac App Store. You will need version 4.3 or above. Then install homebrew. Go to this link ( https://github.com/mxcl/homebrew/wiki/installation) to find the installation command. As of May 2012, the command is: /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" Then after the process finishes (it took like 30 seconds), run brew doctor This is just to make sure your environment is good to move on. If your Xcode is old you will get a complain here like the following: ...

May 19, 2012 · 3 min · birdchan

Check the existence of an element in jquery

When dealing with dynamic creation of DOM objects, sometimes you need to check if a certain element exists. Below is how you check: if ($('#my_element').length > 0){ // it exists! } If you need to check whether a dropdown has any options, here is how if ($('#my_dropdown option').length > 0){ // contains options }

May 16, 2012 · 1 min · birdchan

Breathing Observation Bubble (B.O.B.) in Hawaii

[youtube &w=640&h=480] This apparently is a new “water tourist thing” in Hawaii. Looks interesting!

May 9, 2012 · 1 min · birdchan

A Short History of the Modern Calendar

[youtube &w=640&h=360]

May 8, 2012 · 1 min · birdchan

What does "al dente" mean when cooking pasta?

Al dente is a fancy term for pasta that’s fully cooked, but not overly soft. The phrase is Italian for “to the tooth,” which comes from testing the pasta’s consistency with your teeth. [ wikipedia] How does one cook pasta “just right”? According to the National Pasta Association: Boil 4 to 6 quarts of water for one pound of dry pasta. (You can divide this recipe depending on how much pasta you are cooking.) ...

May 5, 2012 · 1 min · birdchan

Find out the physical memory size in osx

Far too often I accomplish this by clicking on the apple icon on the menu bar, then click “About this Mac”, then just read from the popup window. This is perfectly fine and all, until one day I was given only a shell and I needed to get that info. Well, here is how you can do it in command line: sysctl -a | grep mem Then look for hw.memsize in the list. The number is in byte size, so you will need to do some conversion in your head. For example, if you see hw.memsize = 12884901888, that’s actually 12 * 1024 * 1024 * 1024, which is 12Gb. ...

May 2, 2012 · 1 min · birdchan

Nest Learning Thermostat

[youtube &w=640&h=360] Interesting thermostat from Nest. The website also has an installation tutorial video.

May 1, 2012 · 1 min · birdchan

Bach, Toccata and Fugue in D minor, organ

[youtube &w=640&h=480]

April 27, 2012 · 1 min · birdchan