This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'template_redirect', 'redirect_to_index', 9 ); | |
function redirect_to_index() { | |
if ( preg_match( "/login|admin/i", $_SERVER[ 'REQUEST_URI'] ) > 0 ) { | |
return false; | |
} | |
if ( !is_user_logged_in() ) { | |
wp_redirect( home_url() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Check if slave is already configured for replication | |
mysql_replication: mode=getslave | |
ignore_errors: true | |
register: slave | |
when: mysql_repl_role == 'slave' | |
tags: mysql | |
- name: Get the current master servers replication status | |
mysql_replication: mode=getmaster | |
delegate_to: "{{ mysql_repl_master }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `find . -name "*.png"`; do optipng -o5 -quiet -keep -preserve -log optipng.log "$i"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host Loss% Snt Last Avg Best Wrst StDev | |
1. 10.124.54.1 0.0% 13 8.0 9.0 7.0 12.7 1.4 | |
2. vl-201.gw03.rchrd.phub.net.cable.rogers.com 0.0% 13 14.0 13.0 10.7 16.4 1.5 | |
3. ??? | |
4. ??? | |
5. 2120.ae0.bdr01.tor.packetflow.ca 90.9% 12 11.2 11.2 11.2 11.2 0.0 | |
6. ??? | |
Host Loss% Snt Last Avg Best Wrst StDev | |
1. 10.124.54.1 0.0% 18 7.6 9.4 7.3 16.8 2.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04:17:11 Sat Oct 27 | |
[vmg@beech Performance]> siege -b --time=30s --log=perf.log -f swplinks | |
** SIEGE 2.71 | |
** Preparing 15 concurrent users for battle. | |
The server is now under siege... | |
Lifting the server siege... done. | |
Transactions: 59200 hits | |
Availability: 100.00 % | |
Elapsed time: 29.98 secs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Define where error logging will be written to. | |
*/ | |
@ini_set('log_errors','On'); | |
@ini_set('error_log','/path/to/logs/php_error.log');</code> | |
/** | |
* This will log all errors notices and warnings to a file called debug.log in | |
* wp-content only when WP_DEBUG is true. if Apache does not have write permission, | |
* you may need to create the file first and set the appropriate permissions (i.e. use 666). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ req ] | |
default_keyfile = ./root_CA.key | |
default_md = sha1 | |
distinguished_name = req_distinguished_name | |
x509_extensions = v3_ca | |
string_mask = nombstr | |
req_extensions = v3_req | |
[ req_distinguished_name ] | |
countryName = Country Name (2 letter code) | |
countryName_default = CA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BITS=2048 | |
DAYSVALID=7300 | |
RANDDEV=/dev/urandom | |
CNF=./make_root_CA.conf | |
DER=./root_CA.der | |
PEM=./root_CA.pem | |
KEY=./root_CA.key | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('gform_pre_render', 'swp_populate_attendee_list'); | |
function swp_populate_attendee_list($form){ | |
$num = swp_get_the_amount(); | |
if ( count( $num ) < 1 ) { | |
add_filter('gform_get_form_filter', create_function('', "return 'You have not met the condition! Please go to <a href=\"/?page_id=1\">this form.</a>';") ); | |
} | |
return $form; |
NewerOlder