View wp-config-snippet.php
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
// REPLACE EXISTING DB define lines with this code | |
// Technique taken from | |
// http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/ | |
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) { | |
include( dirname( __FILE__ ) . '/wp-config-local.php' ); | |
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later | |
} else { | |
define('DB_NAME', 'production_db_name'); | |
define('DB_USER', 'production_db_user'); |
View wp-config-local.php
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 | |
define('DB_NAME', 'local_db_name'); | |
define('DB_USER', 'local_db_user'); | |
define('DB_PASSWORD', 'local_db_pwd'); | |
define('DB_HOST', 'localhost'); | |
define('WP_DEBUG', true); |
View sort.php
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 | |
// short code to display by meta_key job_title | |
add_shortcode( 'burbs_sort_test', 'burbs_sort_test' ); | |
function burbs_sort_test() { | |
global $post; | |
echo '<pre>'; | |
$atts = array( | |
'post_type' => 'post', | |
'order' => 'ASC', |
View centos-patch-heartbleed
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
# SSH into the server as root | |
# confirm Linux version CentOS 6.5 | |
cat /etc/*-release | |
# clear metadata (ensure we get the latest release) | |
yum clean metadata | |
# update openssl | |
yum update openssl |
View fe-google-sitemap-plugin-https-fix.php
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_filter( 'plugins_url', 'fe_google_sitemap_plugin_https_fix', 10, 3 ); | |
function fe_google_sitemap_plugin_https_fix( $url, $path, $plugin ) { | |
if ( 'sitemap.xsl' !== $url ) { | |
return $url; | |
} | |
if ( 'https://' === substr( $url, 0, 8 ) ) { | |
// the url begins with https, which we do NOT want | |
// change url to start with http instead of https | |
$url = 'http' . substr( $url, 5 ); |
View error-log.js
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
// BEGIN DEV JS CODE for error_log | |
jQuery(document).ready( function($) { | |
$log = $('<div><h3>Log</h3></div>').css({ | |
'position': 'absolute', | |
'top': 0, | |
'left': 0, | |
'width': 300, | |
'border': '1px solid red', | |
'background': 'white', |
View instructions-CVE-2014-6271.txt
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
# SSH into server | |
# change to root account using `su` (if you're not already logged in as root) | |
# Test for vulnerability | |
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | |
# If you see this output, you're not vulnerable and logout now | |
# bash: warning: x: ignoring function definition attempt | |
# bash: error importing function definition for `x' | |
# this is a test |
View README.txt
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
How to use | |
[button link='http://linktosomething.com' color='orange']My Button Text![/button] |
View composer.json
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
{ | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "package", | |
"package": { | |
"name": "WebDevStudios/Hash-Link-Scroll-Offset", |
View composer.json
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
{ | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "vcs", | |
"url": "https://github.com/WebDevStudios/Hash-Link-Scroll-Offset" | |
} |
OlderNewer