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 | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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
<!-- Start Additional Resoruce Loop --> | |
<?php | |
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; | |
$args = array( | |
'post_type' => 'additionalresource', | |
'posts_per_page' => 10, | |
'paged' => $paged, | |
'orderby' => 'date', | |
); | |
$the_query = new WP_Query( $args ); |
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
//Ref: http://codex.wordpress.org/Function_Reference/the_editor | |
//== how to add TinyMCE wysiwyg to your custom textarea plugin == | |
the_editor($content, $id, $prev_id, $media_buttons, $tab_index, $extended); |
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
gource --user-image-dir .git/avatar/ --max-file-lag 3 --seconds-per-day 1 --hide filenames,mouse,progress -1024x768 -o - | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -vpre /usr/share/ffmpeg/libx264-lossless_slow.ffpreset -threads 0 gource.mp4 |
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 remove_wp_logo( $wp_admin_bar ) | |
{ | |
$wp_admin_bar->remove_node('wp-logo'); | |
} | |
add_action( 'admin_bar_menu', 'remove_wp_logo', 999 ); |
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
@mixin debug | |
border: 1px solid red | |
@mixin hide-txt | |
overflow: hidden | |
text-indent: 1500% | |
white-space: nowrap | |
@mixin clearfix | |
&:before, |
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
web1: | |
document_root: public | |
php_version: 5.3.10 | |
php_extensions: | |
- mbstring | |
- mcrypt | |
- pdo_mysql | |
- mysql | |
- apc | |
- memcached |
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 | |
#domain.com/?run_script=1 to run this script | |
function add_my_custom_meta_key(){ | |
global $wpdb; | |
if ($_GET['run_script'] =='1' && !is_admin() ) | |
{ | |
$q = 'SELECT id from wp_posts where post_type = "MY_CUSTOM_POST_TYPE"'; | |
$ids = $wpdb->get_col($q); | |
foreach($ids as $id) | |
{ |
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 | |
echo "127.0.0.1 will be used if IP-Address is blank."; | |
read -p "IP-Address: " IP_ADDRESS | |
read -p "Site Name: " SITE_NAME | |
#Add a new /etc/hosts | |
if [ -n "$IP_ADDRESS" ]; then | |
#not empty | |
sudo -- sh -c "echo ${IP_ADDRESS} ${SITE_NAME} >> /etc/hosts" |
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
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |