Skip to content

Instantly share code, notes, and snippets.

View bhubbard's full-sized avatar
:octocat:
Hello

Brandon Hubbard bhubbard

:octocat:
Hello
View GitHub Profile
<!-- Add these tags to the HEAD section of your page. -->
<link href="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css">
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></script>
<!-- You also need to place a container where you'd like the Coderwall badges to render. -->
<section class="coderwall" data-coderwall-username="(your username)" data-coderwall-orientation="(vertical or horizontal)"></section>
User-agent: *
# Disallow
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
<?php
/* Register our IE specific stylesheets. */
wp_register_style( 'prefix-ie7-only', get_template_directory_uri() . '/css/ie7.css' );
wp_register_style( 'prefix-ie8-only', get_template_directory_uri() . '/css/ie8.css' );
wp_register_style( 'prefix-ie9-only', get_template_directory_uri() . '/css/ie.css' );
/* Use the global wp_styles object to add our conditional statements due to the lack
* of conditional support in wp_register_style
*/
#!/bin/bash
# cd into the directory
cd ~/gitsync/github-wordpress-sync/;
# Make sure we are not already running
if [ -f .sync-running ];then
if test ! `find ".sync-running" -mmin +10`;then
# Currently running, but not stuck
exit 1;
fi
fi;
function vhost {
sudo ~/.dotfiles/osx/mamp_vh.sh $1
}
function allow_my_post_types($allowed_post_types) {
$allowed_post_types[] = 'my_post_type';
return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'allow_my_post_types');
#!/bin/bash
# Input database name
echo "---"
echo "wpinstall.sh - A WordPress installation shell script"
echo "by Rutger Laurman"
echo "---"
echo "- Requires WP-CLI, make sure you install that first (http://wp-cli.org/)"
echo "- Check file for configurations"
echo "- Downloads, configures, installs WordPress, default theme and plugins"
#!/bin/bash
# Usage: basic-install [OPTIONS] file
#
# Index:
#
# 0.- Initial Setup and Functions
# 1.- Set your server correctly
# 2.- Install latest WordPress version
# 3.- Set up anti-spam and security measures
$photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
// Call wp_get_attachment_image(), wp_get_attachment_image_src(), or anything else that ultimately calls image_downsize()
if ( $photon_removed )
add_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ), 10, 3 );