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.
Category: Programming
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
How to Get The Domain and TLD from a URL using PHP and Regular Expression
How to get a domain and it’s TLD from a URL string using PHP and Regular Expression: preg_match(“/[a-z0-9\-]{1,63}\.[a-z\.]{2,6}$/”, parse_url($_url_string, PHP_URL_HOST), $_domain_tld); echo $_domain_tld[0]; This is particularly useful for dealing with country TLD’s, like co.uk, on.gc along with the general .com, .net, etc. It is also capable of ruling-out multiple subdomains like: http://i83tr.cdn-2.delivery.net/homepage/sprite.png so you end… Continue reading How to Get The Domain and TLD from a URL using PHP and Regular Expression
Can’t Find Documentation on a WordPress Function?
QueryPosts.com is a great site for documentation and source details on WordPress functions. WordPress.org’s Codex is an essential site for referencing the inner workings of WordPress and does have a long list of documentation covering most of the WordPress functions, but does not cover all the functions available in WordPress and doesn’t show the functions’… Continue reading Can’t Find Documentation on a WordPress Function?
Track Google Analtyics Event in PHP
Using php-analytics-event is a way to register Google Analtyics Events from PHP, instead of having to load a javascript Google Analytics Event. This is extremely helpful if you want to track events for file downloads or before forwarding to another site. A great class to help keep track of backend events. Well worth a taking… Continue reading Track Google Analtyics Event in PHP
Quick Command Line Compress with Zip
It’s always nice to have an easy and quick command to compress a directory, remove the git info as well as the .DS_Store files. zip -r9 directory_name.zip directory_name -x *.git* *.DS_Store*
Javascript mime types
Header Mime Types are one of the oldest ways for the web to communicate what type of media a file is (I would assume file extensions are the oldest way). Mime types are strings of meta-data sent when HTTP is communicating what the content type of a file being transmitted is. But, with this meta-data… Continue reading Javascript mime types
RSYNC – Fastest Way to Download a Clone of any directory
RSYNC is the fastest way to clone and sync directories from any server. Below is an rsync example using ssh tunneling on port 2222 to a server using cPanel, thus the exclusion of the .cpanel and public_ftp. /home/user is the folder to clone/sync to /Volumes/HardDrive/BackupLocation. And a log file is created to log any issues… Continue reading RSYNC – Fastest Way to Download a Clone of any directory
iOS URL to App Schemes
A lot of times when creating a webpage you’d like to be able to open an app from a link on that page. Luckily there is a way for app developers to add support for custom URL schemas, which means you can launch an app from a link on a web-page. To do that, you… Continue reading iOS URL to App Schemes
PHP, Dynamically Checking Colors for Legibility Contrast
When writing code to dynamically create background colours and text colours, there is always the potential those two colours will not look appropriate together, and will either render the text illegible or create oscillating text. Enter Split Brain .org‘s Color Contrast Checker It’s a very helpful script, to prevent some illegible dynamic text colors from… Continue reading PHP, Dynamically Checking Colors for Legibility Contrast