Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |
<?php | |
/** | |
* Main plugin file. This plugin for Genesis Theme Framework allows modifying of default layouts for | |
* homepage, singular, archive, attachment, search, 404 and even bbPress 2.x pages via Genesis theme settings. | |
* | |
* @package GenesisLayoutExtras | |
* @author David Decker | |
* @origin Based on the work of @WPChildThemes for original plugin called "Genesis Layout Manager" (C) 2010 | |
* | |
* Plugin Name: Genesis Layout Extras |
#!/bin/sh | |
echo " | |
Cool, let's start. | |
" | |
src=$PWD |
<?php | |
add_action( 'after_setup_theme', 'bootstrap_setup' ); | |
if ( ! function_exists( 'bootstrap_setup' ) ): | |
function bootstrap_setup(){ | |
add_action( 'init', 'register_menu' ); | |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
add_filter( 'genesis_author_box', 'be_author_box', 10, 6 ); | |
/** | |
* Author Box | |
* | |
*/ | |
function be_author_box( $output, $context, $pattern, $gravatar, $title, $description ) { | |
$output = ''; | |
<?php | |
/** | |
* Possibly amend the loop. | |
* | |
* Specify the conditions under which the grid loop should be used. | |
* | |
* @author Bill Erickson | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.oldsite.com', 'http://www.newsite.com'); |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; | |
DROP SCHEMA IF EXISTS `mydb` ; | |
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; | |
USE `mydb` ; | |
-- ----------------------------------------------------- | |
-- Table `mydb`.`users` |
<?php | |
/** | |
* Section Menu | |
* Displays the subpages of the current section | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/custom-secondary-menu | |
*/ | |
function be_section_menu() { |