Get a VPS that offers 2 or more IP addresses.
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
#!/usr/bin/php -q | |
<?php | |
if(isset($argv[1]) && strlen($argv[1])) { | |
$file = $argv[1]; | |
}else{ | |
echo 'Please Specify a File'; | |
exit(1); | |
} |
#You should do all your LAMP development in a Virtual Machine
##Here's Why:
Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.
Our computers become powerful develoment machines similar to the servers our apps will eventually live on.
Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
<?php | |
$timezones = array( | |
'America/Adak' => '(GMT-10:00) America/Adak (Hawaii-Aleutian Standard Time)', | |
'America/Atka' => '(GMT-10:00) America/Atka (Hawaii-Aleutian Standard Time)', | |
'America/Anchorage' => '(GMT-9:00) America/Anchorage (Alaska Standard Time)', | |
'America/Juneau' => '(GMT-9:00) America/Juneau (Alaska Standard Time)', | |
'America/Nome' => '(GMT-9:00) America/Nome (Alaska Standard Time)', | |
'America/Yakutat' => '(GMT-9:00) America/Yakutat (Alaska Standard Time)', | |
'America/Dawson' => '(GMT-8:00) America/Dawson (Pacific Standard Time)', |
/* | |
Plugin Name: Patti | |
Description: Modify Wordpress Add New Post for Adding Patti Data | |
Version: 1.0 | |
Author: Ankit Agrawal | |
*/ | |
/****************************************************************************/ | |
/************************* ADD PATTI CUSTOM FIELDS *************************/ | |
add_action( 'admin_init', 'patti_admin' ); |
<?php | |
include __DIR__ . '/threads.php'; | |
$commands = array(); | |
for ( $i=0; $i<10; $i++ ) { | |
$commands[] = "bash -c 'sleep `shuf -i 1-5 -n 1`; echo $i'"; | |
} |
body { | |
font-family:'Microsoft JhengHei', '微軟正黑體', 'Microsoft YaHei', sans-serif; | |
} |
<?php | |
function getRealIpAddr() | |
{ | |
if ( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) | |
{ |
/** Break html5 cart caching */ | |
add_action('wp_enqueue_scripts', 'cartcache_enqueue_scripts', 100); | |
function cartcache_enqueue_scripts() | |
{ | |
wp_deregister_script('wc-cart-fragments'); | |
wp_enqueue_script( 'wc-cart-fragments', get_template_directory_uri() . '/cart-fragments.js', array( 'jquery', 'jquery-cookie' ), '1.0', true ); | |
} |