bettes midler

a real life website by Jonny Nail   ·   life + code

dynamic CSS background images

Include the 'fake' CSS file...

<link type="text/css" href="css/style.php">

Build the 'fake' CSS file...

HTML GO!

<h2 class="something"><span>Something</span></h2>

BOOM!

headers/something.png will be set as the header's background image.

June 2, 2010 [17:26]

HTML5 Testing: Video

Using the new HTML5 <video> tag and the Video For Everybody no Javascript embed method.

See also: the video chapter of Mark Pilgrim's Dive Into HTML5 book for info regarding video encoding methods and more advanced embed options for browsers not yet supporting the <video> tag.

May 19, 2010 [15:12]

resizeEmbeds

Takes a string of HTML and resizes all of the embeds/objects to a specific size. Handy for resizing videos to a specific size.

May 13, 2010 [23:17]

getTimeDiff

If $loop is set to true, the format returns as: 3 hours 24 minutes 15 seconds.
If $loop is set to false (or left as the default), it returns as: 3 hours.

February 25, 2010 [20:35]

unfollow everyone!!!! (on Twitter)

PHP/API hook-in to unfollow EVERYONE that you are following on Twitter. Start fresh!

February 18, 2010 [15:29]

remove HTML object tags from a string

February 9, 2010 [14:06]

last fm recent tracks

Here is a simple little PHP snippet I use to display the most recent tracks from my Last FM profile. The example below prints in a similar format to the list I have started including on the homepage.

Notes:

January 20, 2010 [17:54]

cURLs get the gURLs

Simple little function to cURL a remote URL, with the option to also post an array of data.

January 19, 2010 [11:06]
MORE+++ get rid of those annoying little question mark diamonds // get rid of that trailing slash // five things Google Wave might be // class.db.php // vertical and horizontal centering with CSS // SQL: using REPLACE in an UPDATE statement // if you don't exist, we are going to make you. then we are going to open you up. // memory is full // Adding new table rows (with a lil' help from jQuery) // getTimeDiff // position:fixed in IE 6 (without using 'expressions') // getDirectoryTree // are you over 18..? // tag cloudin' // mod rewrites for Zeus web servers // convertUrlsToLinks // iPhone Detection // getImage // orderMultiAssocArray // +++++ HOME
all content (except where noted) © Jonny Cache 1982 → 2067
RSS // life + code