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/bash | |
SLAVE_DB_USER="foo" | |
SLAVE_DB_PASS="bar" | |
SLAVE_DB_NAME="foobar" | |
SLAVE_DB_HOST="127.0.0.1" | |
MASTER_DB_USER="production_foo" | |
MASTER_DB_PASS="foobarbaz" | |
MASTER_DB_NAME="production" |
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
function lazy_sitemap(){ | |
$generated = get_option('sitemap_generated'); | |
if($generated!=1){ | |
$sitemap = "Our Software Framework | |
Who we Help | |
Benefits of our Software | |
BPM Explained | |
Services | |
Company | |
About Us |
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
if(0){ | |
$generated = get_option('sitemap_generated'); | |
if($generated!=6){ | |
$default_pages = array_diff(scandir(get_stylesheet_directory().'/inc/pages/'), array('..', '.','.DS_Store','.TemporaryItems','.com.apple.timemachine.supported','.htaccess','.localized','.svn','index.php')); | |
$existing_pages = get_pages(); | |
$temp = array(); | |
foreach ($existing_pages as $page) { | |
$temp[] = $page->post_title; | |
} |
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
{ | |
"build_systems": | |
[ | |
{ | |
"cmd": | |
[ | |
"mysql -uxxxx -pxxxx -e 'create database ${project_name/.sublime-project//}'" | |
], | |
"name": "CREATE PROJECT DB", | |
"path": "~/bin/", |
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
/* Repurposed from: http://kovshenin.com/2012/wordpress-multisite-with-wildcard-subdomains/ | |
** I found that giving each subdomain their own entry ran significantly faster. | |
*/ | |
add_action( 'wp_footer', 'print_entry_for_hosts_file' ); | |
function print_entry_for_hosts_file() { | |
global $wpdb; | |
$domains = $wpdb->get_col( "SELECT domain FROM $wpdb->blogs;" ); | |
foreach($domains as $domain){ | |
echo "127.0.0.1 " . $domain . "\n"; |
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 | |
/** | |
* Additional setup for our freshly baked Ad Code Manager v0.2 | |
* Not tested with v0.1 | |
* | |
* Quick config for DFP JS API | |
* | |
*/ | |
// Add additional output tokens |
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
function aspectRatioRespond(){ | |
elements = jQuery('[data-ratio]'); | |
console.log(elements); | |
elements.each(function(){ | |
container = jQuery(this); | |
autoHeight = container.data('ratio'); | |
ratio = autoHeight.match(/(\d+)\:(\d+)/); | |
ratio = ratio[1] / ratio[2]; | |
console.log(ratio); | |
container.height( container.width() / ratio ); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name = "viewport" content = "width=device-width, minimum-scale=1, maximum-scale=1"> | |
<!-- META --> | |
<meta charset = "utf-8"> |
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
$brand-colors: ( | |
#57585b, // grey | |
#d1662a, // orange | |
#632f54, // purple | |
#5e6e63, // green | |
#d2a732, // yellow | |
#006e94, // blue | |
#790025 // red | |
); |
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
function aspectRatioRespond(){ | |
mobileMax = 480; | |
elements = jQuery('[data-ratio]'); | |
elements.each(function(){ | |
container = jQuery(this); | |
var elRatio = container.data('ratio'); | |
var elMobileRatio = ( typeof container.data('mobile-ratio') == 'string' ) ? container.data('mobile-ratio') : container.data('ratio'); | |
if(container.width() < mobileMax){ | |
autoHeight = elMobileRatio; | |
}else{ |
OlderNewer