This file contains 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
#Export a SQL to use to move into Production | |
wp search-replace '{{DEVELOP_URL}}' '{{PRODUCTION_URL}}' --all-tables --export=production.sql |
This file contains 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 {10..1}; do custom_date=$(date -v-${i}d "+%Y-%m-%d") && curl http://loripsum.net/api/5/headers/ul/bq | wp post generate --post_content --count=1 --post_date=$custom_date; done |
This file contains 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 | |
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40 | |
class DumpHTTPRequestToFile { | |
public function execute($targetFile) { | |
$data = sprintf( | |
"%s %s %s\n\nHTTP headers:\n", | |
$_SERVER['REQUEST_METHOD'], | |
$_SERVER['REQUEST_URI'], | |
$_SERVER['SERVER_PROTOCOL'] |
This file contains 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_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 ); | |
/** | |
* Auto login to site after GF User Registration Form Submittal | |
* | |
*/ | |
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) { | |
wp_set_auth_cookie( $user_id, false, '' ); | |
} |
This file contains 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 | |
/*********************** | |
*@author: Ritesh Agrawal | |
*@description: Identifies php files that contain leading or trailing spaces before or after PHP opening or closings tags | |
*@version: 1.0 | |
*@date: Nov 06, 2007 | |
@todo – check only *.PHP or *.CTP files rather than checking all of the files | |
– html based output | |
***********************/ | |
//Set Source Path |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |