Ampersands in WordPress Posts and Pages are always encoded into either their numeric (&) or name (&) html entity. This can become troublesome if you are including javascript into the page or post. Using the ampersand’s unicode code point value (0026) is the best way around this issue. So writing ampersand would be done by… Continue reading Prevent Ampersand Issues in Javascript on WordPress Pages & Posts
Category: Programming
Quickly Run A HTTP Server From Any Directory
Python makes it easy to run a simple http server from any directory on your system. From command line execute the following command from the directory you would like the server to run from: $ python -m SimpleHTTPServer 8080 A simple http server will be running with the root being whatever directory you executed the… Continue reading Quickly Run A HTTP Server From Any Directory
Debug and Inspect Webpages on AVD (Android Emulator) Browsers
There is a lot of documentation on the web on ways to debug websites for Android using their AVD (Android Virtual Device/Emulator). But I thought to make a simple step-by-step instruction to get a web debugger up and running for an AVD. Weinre is the debugger that I use. You can download weinre build from… Continue reading Debug and Inspect Webpages on AVD (Android Emulator) Browsers
SD Card Backup Image – Raspberry Pi Disk Clone
To make a backup / clone of an SD card from within OS X, open Terminal and run $ sudo dd if=/dev/disk2 bs=1m | gzip > ~/Desktop/raspberry_clone.gz (If you’re not sure what /dev/disk the SD card is, run $ diskutil list and you’ll see where the SD Card is mounted). It can take a while… Continue reading SD Card Backup Image – Raspberry Pi Disk Clone
Batch Rename files in 1 Shell Command
i=0; for x in *.jpg; do cp $x “image_$i.jpg”; i=$(($i+1)); done The above command will copy all jpeg files in a directory and give them a new name with an iterating numerical value. So if you had five images in a directory: bird.jpg, cat.jpg, dog.jpg, fish.jpg and hamster.jpg Executing the above command in the directory… Continue reading Batch Rename files in 1 Shell Command
ISO 2 Character And 3 Character Country Codes
Here is an SQL file of the 2 Character and their corresponding 3 Character ISO Country Codes: ISO_CC.sql I’ve needed to use this several times, so I thought posting might help someone.
Easy Regular Expression Testing
RegEx Pal is the best online Regular Expression testing system I have ever used. It is remarkably easy to use, it performs the regular expression in real-time and highlights syntax. It was launched in 2007, and I’m sorry to have only found it now, because using it has improved my skills with regular expression 10-fold… Continue reading Easy Regular Expression Testing
AWS EC2 Amazon Linux AMI change timezone
AWS (Amazon Web Services) EC2 Amazon Linux AMI timezone will most likely be different than your local machines’ timezone. To remedy this issue on Amazon’s Linux machine image, ssh in and type the following commands in prompt: sudo su become root user ln -sf /usr/share/zoneinfo/America/Toronto /etc/localtime Choose your time zone ( in this example Toronto… Continue reading AWS EC2 Amazon Linux AMI change timezone
Triage – Handmade Leather Goods
Just finished helping a friend get a shop up and running: http://triagegoods.com On WordPress, this store represents a lot of work and fun. It’s worthing taking a peak at. Will be working hard to market with all the middle ware goodness that exists now a days.
Solving WordPress’s White Screen of Death
WordPress has an issue that can be dumbfounding to say the least. An occurrence called the “White Screen of Death” can happen for really any issue; incompatible plugin, theme bug, an update to a file, etc. But it’s the blank screen with no information that is the difficult part of solving the blank screens cause.… Continue reading Solving WordPress’s White Screen of Death