Blog Archives
Goals4Me
Goals are the fuel in the furnace of achievement. -Brian Tracy, Eat that Frog I ve just put together a preliminary version of a goal setting and tracking app where one can objectively identify what his or her primary goal … Continue reading
CSS max-width to the rescue
You can’t do anything about the length of your life, but you can do something about its width and depth -Henry Louis Mencken Recently I discovered a wonderful CSS2 property: max-width. This property lets you fit your images inside … Continue reading
Solution for jQuery Cycle’s scrollHorz property hiding slides
There are two ways to slide easily through life: to believe everything or to doubt everything. Both ways save us from thinking. -Alfred Korzybski This is more of a reminder for me than anything else. If it helps you then … Continue reading
Javascript equivalent for PHP’s array_map()
To map out a course of action and follow it to an end requires courage Ralph Waldo Emerson I was looking for an equivalent of the PHP array_map() function or the Python map() function in Javascript. Turns out that Javascript … Continue reading
How to split an array into smaller arrays
“The soul can split the sky in two and let the face of God shine through.” -Edna St. Vincent Millay Some days ago I need to split an array into multiple smaller arrays. I m not sure if this is … Continue reading
How to find and replace in multiple files from the terminal
You have to kiss a few frogs before you find a prince. -Anonymous There are times when you d like to search for a word/phrase/regular expression in a number of files together and optionally replace it with something else. If … Continue reading
How to replace multiple instances of a string in Javascript
If you don’t like something change it; if you can’t change it, change the way you think about it. -Mary Engelbreit You can use String.replace(/oldstring/g, “new string”); to replace multiple instances of a string but what if you did not … Continue reading
Making HTML tags more useful by custom attributes
Being good is commendable, but only when it is combined with doing good is it useful. -Anonymous I have been over using a simple technique to pass on more data to an HTML element in order to manipulate it better … Continue reading
How to quickly create iPhone style on off buttons
Whenever you’re pissed off, just remember that it’s better than being pissed on. -Christopher Titus The famous iPhone on off style sliding buttons can be quickly created by using jQuery and jQueryUI draggable behavior. Here’s quick demo if you’d like … Continue reading
Vimeo’s embed code doesn’t go well with jQuery
Ain’t no fool like an old fool -Anonymous If you are using some jQuery to load a page with the latest Vimeo embed code then there are chances it ll throw out this error: Permission denied for <http://player.vimeo.com> to get … Continue reading
