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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.2.deb | |
sudo dpkg -i elasticsearch-1.2.2.deb | |
sudo service elasticsearch start | |
#curl http://localhost:9200 |
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
protected void Application_Error() | |
{ | |
var unhandledException = Server.GetLastError(); | |
var httpException = unhandledException as HttpException; | |
if (httpException == null) | |
{ | |
var innerException = unhandledException.InnerException; | |
httpException = innerException as HttpException; | |
} |
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('init','add_categories_to_cpt', 200); | |
function add_categories_to_cpt(){ | |
register_taxonomy_for_object_type('search_tags', 'post_type'); | |
} |
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( 'init', 'update_taxonomy'); | |
function update_taxonomy() { | |
$posts = get_posts( | |
array( | |
'post_type' => 'post', | |
'posts_per_page' => -1 | |
) | |
); |
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( 'init', 'update_taxonomy'); | |
function update_taxonomy() { | |
$posts = get_posts( | |
array( | |
'post_type' => 'page', | |
'posts_per_page' => -1, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'content_category', |
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
// Regex via http://stackoverflow.com/a/6582227/12442 | |
// jQuery Filter idea via http://stackoverflow.com/a/193787/12442 | |
jQuery(function() { | |
jQuery('a').filter(function() { | |
return this.href.match(/\.([0-9a-z]+)(?:[\?#]|$)/i); | |
}).prop('target', '_blank'); | |
}); |
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 a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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 a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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 class="fb-comments"data-href="<?php the_permalink(); ?>" data-num-posts="2" mobile="false"></div> |
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: Posterous Importer | |
Plugin URI: http://wordpress.org/extend/plugins/posterous-importer/ | |
Description: Import posts, comments, tags, and attachments from a Posterous.com blog. | |
Author: Automattic, Brian Colinger, Peter Westwood, Daryl L. L. Houston | |
Author URI: http://automattic.com/ | |
Version: 0.10 | |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
*/ |
OlderNewer