How do keys and locks work?
Check out this interesting animated GIF. Very nice illustration of how keys and locks work.
Check out this interesting animated GIF. Very nice illustration of how keys and locks work.
My friend Johnny is a very talented web designer. He’s recently released a portfolio WordPress theme at ThemeForest which is very classy and cutting-edge in styles. SimpleKey Be sure to also check out some of his other work at the ThemeForest page and his design studio ThemeVan.
I don’t know why but I’m just so happy. I just returned from a hiking in the Qin Mountains. It’s gently snowing while we climb one of the mountains to an altitude of about 1000 meters above sea level. It’s been terrific in the outdoors! We have a good company of many friends and strange but …
It’s better to style the /wp-admin of WordPress from your theme because it’s portable and upgrade-proof. Keeping all customizations in ONE place is always a good idea in web development. How to style WordPress admin backend /wp-admin from your theme? Add this hook to the functions.php of your theme: function customAdmin() { ?><link rel="stylesheet" type="text/css" href="<?php bloginfo(‘stylesheet_directory’); ?>/wp-admin.css" …
Customize WordPress Admin Styles from Your Theme Directory Read More »
Some of my sites such as ConvertHub has grown out of the 512MB box I have had for over 2 years at Linode. It’s been great but as I’m fed up with managing the server myself (I’ll come to that later), I went ahead looking for a solid VPS plan with WHM / cPanel that’s …
Super Cheap Cloud VPS: 1 Core, 1024MB, SSD, Managed – Just $21.25 / Month Read More »
Consider this hook to add something before your WordPress blog’s sidebar: function before_siderbar() { ?> <!– Something goes here, such as an AdSense links unit –> <?php } add_action( ‘get_sidebar’, ‘before_siderbar’ ); It’s usual to add an AdSense links unit there but the problem with some themes is that they run get_sidebar more than once, …
PHP mail() is a great function to easily send emails from your website server. If you have ever used it before in action, or are currently using mail() to send out emails from your website or application, chances are you would find Gmail to be very persistent in attaching a ‘via’ field to the from …
Remove Gmail via Field and Add mailed-by & signed-by with PHP mail() Read More »
It became a total mess when I selected the entire root directory of my project and accidentally clicked Source > Format in Zend Eclipse PDT. All the files were instantly re-formatted and saved in a manner I wasn’t comfortable with and there didn’t seem any easy way to undo these changes that had been applied …
Disable Source > Format (Ctrl + Shift + F) in Zend Eclipse PDT Read More »
When you copy and paste code into Zend Eclipse PDT they will probably be automatically indented and not in the original manner. It may be annoying sometimes. To disable this behavior: Window > Preferences > PHP > Editor > Typing > When pasting “Adjust indentation” Just disable the option.
The common practice of rounding, namely the round() function in PHP, is to round to the nearest decimal point, that is, 1.0, 2.0, 3.0, etc. or, 10, 20, 30, etc. For example, echo round(4.25, 0); // 4 echo round(3.1415926, 2); // 3.14 echo round(299792, -3); // 300000 When I’m trying to aggregate all the customer …
PHP: Round to the Nearest 0.5 (1.0, 1.5, 2.0, 2.5, etc.) Read More »
<Files *.php> Order Deny,Allow Deny from all #Allow from 127.0.0.1 </Files> <Files index.php> Order Allow,Deny Allow from all </Files> The 2 <Files> directives must be in the exact same order as above.
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L] Yeah, that’s it. So: /path/dir/ is redirected to /path/dir /path/dir/?a=1&b=2 is redirected to /path/dir?a=1&b=2
At any time, press: Ctrl + Shift + L For a list of available shortcut keys defined in your Zend Eclipse PDT. Go: Window > Preferences > General > Keys To edit the shortcut keys. Or simply press Ctrl + Shift + L twice. For Zend Eclipse PDT to instantly show a tool tip hint …
Shortcut Keys in Zend Eclipse for PHP Developers (PDT) Read More »
The default array() indentation of Eclipse for PHP Developers when you create an array seems to be 2 tabs which I think are too much. To reduce it to just 1 tab: Window => Preferences => PHP => Editor => Typing => formatter preference page => Edit… => Indentation => Default indentation of array initializers Or Window => …
Change array() indentation and wrapped line indentation in Eclipse for PHP Developers Read More »
Many’s the time after you have uploaded some PHP script to your server and point the web browser to the address it gives 500 Internet Server Error. If you have suPHP installed this is very likely because the uploaded PHP script (files and directories) have wrong permissions set to them. With regards to Linux permissions, …
Did you read the recent Yahoo finance news article about 2013’s Top 10 Best Brands and Worst Brands in America? A company called “CoreBrand” conducts an annual survey to determine the most and least respected corporate brands based on the company’s “Familiarity and Favorability data.” This goes beyond the most well known, the most heavily …
I was trying to start a premium membership for Kavoir Backyard and after I have created a Paid Subscription profile, nothing shows up in user control panel nor at /backyard/payments.php. As you can see from the thread I started in the official vBulletin forum for help, I have done everything necessary to create the subscription …
By default browsers such as Firefox sends the Referer information to the target URL in the HTTP header, as defined by HTTP protocol, so the destination URL / website knows where you have come from. For instance, when you click this link to one of my friends’ sites, it would know you have arrived at …
Make Firefox to Not Send HTTP Referer (or On a Per-Site Basis) Read More »
When I encounter the incorrect key file for table error, it’s almost certainly because the disk is full and MySQL can’t write to the tmpdir. The solution is simple, just move tmpdir to another partition with enough disk space. Open my.ini and change tmpdir to another directory with enough disk space. Restart MySQL and that …
By default, phpMyAdmin shows an estimated number of records for InnoDB tables that have more than 20,000 rows. It can vary by every fresh as much as 50% or even more. Makes it hard to get an exact number of records for the tables as we have to explicitly run an SQL query to do …
Make phpMyAdmin Show Exact Number of Records for InnoDB Tables Read More »