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 | |
/* | |
Plugin Name: WP-Cycle | |
Plugin URI: http://www.nathanrice.net/plugins/wp-cycle/ | |
Description: This plugin creates an image slideshow from the images you upload using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images. | |
Version: 0.1.13 | |
Author: Nathan Rice | |
Author URI: http://www.nathanrice.net/ | |
This plugin inherits the GPL license from it's parent system, WordPress. |
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
/** Enqueue a custom javascript file in functions.php */ | |
add_action( 'wp_enqueue_scripts', 'bt_add_scripts' ); | |
function bt_add_scripts() { | |
wp_register_script( 'mystuff', get_bloginfo('stylesheet_directory').'/myscripts.js' ); | |
wp_enqueue_script( 'mystuff' ); | |
} |
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
/** Register code custom post type | |
from http://www.briangardner.com/custom-post-types/ | |
*/ | |
add_action( 'init', 'code_post_type' ); | |
function code_post_type() { | |
register_post_type( 'code', | |
array( | |
'labels' => array( | |
'name' => __( 'Code' ), | |
'singular_name' => __( 'Code Snippets' ), |
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 | |
/* | |
Plugin Name: Vertical Scroll Shortcode | |
URI: http://www.bentedder.com | |
Description: Enhance the "Vertical Scroll" plugin with a shortcode to use in posts | |
Version: 1.0 | |
Author: Ben Tedder | |
Author URI: http://www.bentedder.com | |
License: GPL2 | |
*/ |
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
/* | |
* This is used to override the WordPress search to ONLY search for a | |
* custom post type. I used it on a photographer's website (only wanted | |
* users to search for photo post types). | |
* | |
* I put this snippet somewhere in functions.php | |
*/ | |
function bt_customize_search($form, $search_text, $button_text) { | |
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\""; | |
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\""; |
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 | |
/* | |
Plugin Name: Rollup Posts | |
Plugin URI: http://www.bentedder.com | |
Description: Rollup posts from specific categories with styles | |
Version: 1.0 | |
Author: Ben Tedder | |
Author URI: http://www.bentedder.com | |
License: GPL2 | |
*/ |
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
require(["thing"], function(Thing) { | |
var thing = new Thing({ | |
place: "Chicago" | |
}); | |
thing.runAround(); | |
}); |
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
ps -ax | grep mysql | |
stop and kill any MySQL processes | |
brew remove mysql | |
brew cleanup | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/var/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* |
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
size: limit, | |
query: { | |
bool: { | |
must: { | |
multi_match: { | |
query: term, | |
fields: ['name', 'raw_name'] | |
} | |
}, | |
should: { |
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
<div>list of things</div> | |
<my-pagination | |
(goPage)="goToPage($event)" | |
(goNext)="onNext()" | |
(goPrev)="onPrev()" | |
[pagesToShow]="3" | |
[page]="page" | |
[perPage]="limit" | |
[count]="total"></my-pagination> |
OlderNewer