Skip to content

Instantly share code, notes, and snippets.

View chrisquinnr's full-sized avatar

Chris Quinn chrisquinnr

View GitHub Profile
@chrisquinnr
chrisquinnr / ironinstall.sh
Created May 12, 2015 11:16
Installs Iron CLI, then scaffolds up a new project in your current directory by installing a bunch of awesome packages
#!/bin/bash
# Runs a bootstrapped install for Meteor using iron-cli
npm install -g iron-meteor && iron create newproject && cd newproject && iron add twbs:bootstrap aldeed:collection2 aldeed:autoform aldeed:delete-button aldeed:delete-button accounts-password ian:accounts-ui-bootstrap-3 natestrauser:font-awesome && iron
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'
@chrisquinnr
chrisquinnr / gist:15ab4a7b6489857e82d7
Created March 19, 2015 09:46
WordPress - bind a category editing page to a parent page of your choosing
/**
* This rather nifty snippet forces the category edit screen to be bound to a defined parent
*/
function fixUserTaxPage( $parent_file = '' ) {
global $pagenow;
$taxes = array('taxonomy1', 'taxonomy2', 'taxonomy3');
if ( ! empty( $_GET[ 'taxonomy' ] ) && in_array($_GET[ 'taxonomy' ], $taxes) && $pagenow == 'edit-tags.php' ) {
@chrisquinnr
chrisquinnr / gist:deb3e9d2feaec7bb5b8f
Last active August 29, 2015 14:06
No more "Howdy" in WordPress
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
$current_user = wp_get_current_user();
$profile_url = get_edit_profile_url( $current_user->ID );
if ( 0 != $user_id ) {
// Add the "My Account" menu
$avatar = get_avatar( $user_id, 28 );
$howdy = sprintf( __('Welcome, %1$s'), $current_user->display_name );
$class = empty( $avatar ) ? '' : 'with-avatar';