Skip to content

Instantly share code, notes, and snippets.

Chris Jamieson jamiesoncj

Block or report user

Report or block jamiesoncj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jamiesoncj / gist:9251276
Created Feb 27, 2014
Record a GIF screencast with Byzanz
View gist:9251276
byzanz-record --duration=20 --delay=5 x=0 --y=0 --width=1024 --height=800 output.gif
jamiesoncj / gist:391fac04e764d6710292
Created Jun 12, 2014
Drupal display errors (add to index.php)
View gist:391fac04e764d6710292
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
jamiesoncj / gist:f762dd9c82e00699bb43
Created Jun 15, 2014
Drupal commerce hide billing address fields when giftcard added to make order free
View gist:f762dd9c82e00699bb43
* function to remove billing fields from display if giftcard / coupon makes order total £0.00
// on change due to ajax
$( document ).ajaxComplete(function() {
console.log( "Triggered ajaxComplete handler." );
var orderTotal = $('.page-checkout .view-id-commerce_cart_summary .field-name-commerce-order-total .component-type-commerce-price-formatted-amount .component-total').text();
if(orderTotal == '£0.00'){
console.log('Order total is zero (var: ' + orderTotal + ')');
jamiesoncj /
Last active Aug 29, 2015
Custom video helper - hide the "Upload" option for media module
name = Custom video helper
description = Provides some custom hooks that help video uploads
core = 7.x
package = Media
jamiesoncj / gist:e10676442c9a0aae09ec
Created Aug 12, 2014
Disable pingbacks for Wordpress (SQL query)
View gist:e10676442c9a0aae09ec
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';
jamiesoncj / gist:cccaa992c59ac991c1d7
Last active Aug 29, 2015
Drush commands for standard new site (favourite setup)
View gist:cccaa992c59ac991c1d7

This is a list of favourite Drush commands to quickly get a fresh D7 site up and running as I like it:

  • drush dl views ctools pathauto token delta admin_menu omega_tools omega-3.1 imagefield_focus
  • drush en views views_ui ctools pathauto token delta delta_blocks delta_ui admin_menu admin_menu_toolbar omega_tools imagefield_focus
  • drush dis overlay toolbar color comment dashboard shortcut
  • drush omega-subtheme customtheme
jamiesoncj / gist:479bb5c671add623c1de
Created Aug 21, 2014
Boilerplate for Drupal Omega main menu
View gist:479bb5c671add623c1de
* Main menu
list-style: none;
text-align: right;
jamiesoncj / gist:e187010227a0f88bcfd0
Created Aug 27, 2014
self-invoking jQuery function
View gist:e187010227a0f88bcfd0
(function($) {
// plugin code
jamiesoncj / gist:caf6bb73ab76970e8500
Created Aug 30, 2014
Standard messages to filter / hide using Drupal 7 "disable messages" module
View gist:caf6bb73ab76970e8500
.*Strict warning.*
.*There is a security update available for your version of Drupal.*
.*There are security updates available for one or more of your modules or themes.*
.*One or more problems were detected with your Drupal installation.*
You can’t perform that action at this time.