Skip to content

Instantly share code, notes, and snippets.

View ngmaloney's full-sized avatar

Nick Maloney ngmaloney

View GitHub Profile
@ngmaloney
ngmaloney / gist:674330
Created November 12, 2010 16:47
Hide pesky modal popups on cctimes
javascript:;jQuery('#colorbox, #cboxOverlay').remove();jQuery('.articleGraf').show();
Index: js/jquery.utils.lite.js
===================================================================
--- js/jquery.utils.lite.js (revision 3)
+++ js/jquery.utils.lite.js (working copy)
@@ -1125,12 +1125,12 @@
*/
$.widget('ui.keynav', {
- _init: function(){
+ _create: function(){
@ngmaloney
ngmaloney / drupal_update.sh
Created March 18, 2010 16:03
Drupal Drush Update Script
#!/bin/bash
DRUSH="$(which drush)"
BASEDIR="/var/www/vhosts/mysite.com/httpdocs"
cd $BASEDIR
#Iterate through sites and put in offline mode
ls $BASEDIR/sites |while read line
do
if [[ "$line" != "all" && "$line" != "default" && "$line" != "CVS" ]]
then
<?php
//Removing teaser view from a Drupal Node Preview
/**
* Overrided default preview output by removing teaser view
**/
function mytheme_preview($node) {
$output = '<div class="preview">';
$output .= node_view($node, 0, FALSE, 0);