tech
Mobile Web App Reference
iOS web app icon dimensions: 57×57px for the iPhone 3G and 3GS, 72×72px for the iPad, 114×114px for the iPhone4 Apple Device DPIs: 163dpi for the iPhone 3G and 3GS 132dpi for the iPad 326dpi for the iPhone4 Media Queries Examples: view layout.css on http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign »
aboutmydevice.com : a new site that helps explore a mobile browser’s Javascript properties
Here’s the latest website I’m releasing onto the world: aboutmydevice.com. I wrote it so that I could explore what Javascript properties, objects, and values exist on the browsers of various mobile devices. I walk into a store, go to a phone, load up aboutmydevice.com, and see what kind of... »
Scream in a soundbite.
Scream in a soundbite. Scream in a tweet. Millions will read you. No one will hear you. »
My cousin Graham, living on the bleeding edge of chicken wing consumption tracking technology
http://grahamc.com/blog/how-to-create-a-super-nerdy-superbowl-that-everyone-will-love/ a rather impressive demonstration of skills »
Perl script make MySQL query, binds variables, outputs JSON
An example of a Perl script that is called by an ajax request. The script takes in just one parameter, opens a MySQL DB connection, binds the parameter to the query, and sends the query. The result is then formatted into JSON and returned to the browser. This can be seen in action... »
Perl script makes MySQL query; outputs to JSON
An example of a perl script that is called by an ajax request. The script takes in a few parameters, opens a mySQL DB connection, and then makes a rather tortuous query. The result is then formatted in to JSON and returned to the browser. »
macbook pro turns on but screen stays black — my solution
The Apple Macbook Pro would turn on, but the screen would not. The screen would stay black. I could tell the computer was on because when I hit the “caps lock” key, the green light on the key would turn on and off. I fixed this the following way (this is basically resetting the Power... »
UNIX/AWK Tricks: How to copy a long list of files into a directory
Make your list of files, with complete paths, call it “imgList.txt”. Put every file on a new line. Write a small awk script with the following 1 line: { printf(”cp %s images/\n”,$0);} Save the script as “copyList.awk” Do the following command: awk -f copyList.awk imgList.txt | sh Brief explanation of the awk script: %s means you’re putting a string in that... »
HTML Character Entities in Javascript
Sometimes you need to write html character entities in javascript, but html character entities can’t be used, because they don’t get interpreted by javascript. In javascript, you need to use the equivalent unicode character codes instead. HTML character entity, wrong: formElement.value = "Dirección"; You get: Dirección Unicode character code, correct: formElement.value = "Direcci\u00F3n"; You get: Dirección Unicode character charts are located... »
Handy MySQL Commands
To reset an auto_increment field to 1: ALTER TABLE tbl_name AUTO_INCREMENT = 1; To load a local csv file into an empty existing table: LOAD DATA LOCAL INFILE ‘/completePathToLocalData.csv’ INTO TABLE tableName FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\n’ IGNORE 1 LINES; This assumes you’ve already created your empty table with the same number... »
