Skip to content

Instantly share code, notes, and snippets.

View zachseifts's full-sized avatar
🏠
Working from home

Zach Seifts zachseifts

🏠
Working from home
  • Appalachian State University
  • Boone, NC
View GitHub Profile
; Basic Drush Make file
; See the Drush Make prject page for info:
; http://drupal.org/project/drush_make
; This file by Brock Boland [[email protected]]
;
; This file is also on GitHub:
; http://gist.github.com/404528
; Core version
; ------------
; from http://www.lullabot.com/articles/wysiwyg-feature
; DRUPAL VERSION
core = 6.x
; CORE MODULES
projects[] = drupal
projects[views][subdir] = "contrib"
; FILE HANDLING
projects[imagecache][subdir] = "contrib"
@zachseifts
zachseifts / gist:721933
Created November 30, 2010 16:35
Deleting all nodes of a specific type in Drupal
<?php
/**
* Mass delete nodes of $nodetype
* put the file in the Drupal root and adjust $nodetype and $limit as you like
*
* Mostly borrowed from: http://stream.zerolab.org/post/917260717/mass-delete-nodes-in-drupal
* and http://www.stonemind.net/blog/2009/01/20/headless-drupal-using-drupals-api-to-batch-script-your-drupal-site/
*
*/
<?php
/**
* Build the Shadowbox header by adding the necessary CSS and JS files.
*/
function shadowbox_construct_header() {
global $language;
if (shadowbox_active() && variable_get('shadowbox_enabled', TRUE)) {
// Add the base files.
@zachseifts
zachseifts / node_debian_init.sh
Created April 23, 2011 19:10 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
Many of you know I have a great passion for a good card trick and that I worked for a while as a professional magician. Friends have often heard me brag that opening the BeansTalk was the best trick I ever pulled off.
The common thread in all magic is no matter how beautiful or mystifying; nothing is permanent.
And so it is with a sad heart and more than one tear in my eye I have to share with everyone that its time for the particular bit of magic we all know and love as the BeansTalk to draw to a close.
After several months of difficult negotiations with our property owner and after carefully weighing all of the considerations (including the heartbreak myself, Amelia and all of our customers and staff will go through) it is the only (if undesirable) solution. I dont want to bore or burden anyone with details but will be happy to further clarify our reasoning for those who ask. Suffice it to say that this coffee house has been a dream of mine for 15 years and I moved 3000 miles and spent four years of my
$view = new view;
$view->name = 'programs_index';
$view->description = 'An A-Z index for Programs and Services';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
#!/bin/bash
NOW=$(date +%Y%m%d%k%M%S)
PLATFORM=appstate-7.x-stable-$NOW
PLATFORM_ROOT=/var/aegir/platforms/7.x
PLATFORM_NAME=platform_Appstate7xstable$NOW
# Create a new platform
cd $PLATFORM_ROOT
/opt/drush/drush.php make /var/aegir/builds/dev.make $PLATFORM
<?php
if (is_object($vars['node']) && !empty($vars['node']->iids)) {
foreach($vars['node']->iids as $image) {
$rotating_image = node_load($image);
$node_title = $rotating_image->title;
$header_image .= theme('imagecache', 'banner-header', $rotating_image->images['_original'], $node_title, $node_title);
};
$vars['body_classes'] .= ' heading-image';
#!/bin/bash
#
# migrate.sh - Migrates a site to a new platform
#
function usage() {
cat << EOF
usage:
${0#$SCRIPTSDIR/bin/} [-h] -s @sitename.appstate.edu