Skip to content

Instantly share code, notes, and snippets.

View dbarbar's full-sized avatar

David Barbarisi dbarbar

View GitHub Profile
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"default_line_ending": "unix",
"draw_minimum_border": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_size": 22,
@dbarbar
dbarbar / gist:5662732
Created May 28, 2013 13:25
drush make file with the modules and things we learned from drupalcon. In the directory where you want to install drupal, run "drush make <thisfile>"
api = 2
core = 7.x
projects[drupal][version] = "7.22"
; The Panopoly Foundation
projects[panopoly_core][version] = 1.0-rc4
projects[panopoly_core][subdir] = panopoly
@dbarbar
dbarbar / Vagrantfile
Created August 27, 2013 18:07
Initial attempt at a Vagrantfile and puppet manifest for Springboard 4.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("1") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu1204-64"
<?php
/**
* @file
* Repairs the date mode dates.
*
* Requires the fundraiser_recurring table to be populated
* and the uc_orders table to have at least order_id and created columns.
*
* Run with something like "drush php-script save_the_day.php > results.txt"
*/
<?php
$results = db_query("SELECT order_id, next_charge FROM {fundraiser_recurring} WHERE FROM_UNIXTIME(next_charge) > NOW() and gateway_resp IS NULL");
$count = 0;
while ($row = db_fetch_object($results)) {
$replacements = array('!date' => date('n/j/Y', $row->next_charge));
uc_order_comment_save($row->order_id, 0, t('This order is scheduled to process on !date.', $replacements), 'admin');
drush_print('Added comment to order ' . $row->order_id . ' with next_charge ' . $row->next_charge);
$count++;
}
@dbarbar
dbarbar / .zshrc
Created October 1, 2013 19:57
aliases for my springboard work
alias -r sb3up="cd ~/Development/work/sb3 && vagrant up"
alias -r sb3down="cd ~/Development/work/sb3 && vagrant suspend"
alias -r sb4up="cd ~/Development/work/sb4 && vagrant up"
alias -r sb4down="cd ~/Development/work/sb4 && vagrant suspend"
alias -r sb3work="sb4down && sb3up && pstorm . && open http://sb3.dev && cd src/profiles/springboard/modules/springboard_modules"
alias -r sb4work="sb3down && sb4up && pstorm . && open http://sb4.dev && cd src/sites/all/modules/springboard"
alias -r sbdown="sb3down && sb4down"
<?php
dpm($keyed_components['donation']);
webform_component_update($keyed_components['donation']);
/*
dpm result =
... (Array, 11 elements)
nid (Integer) 48
<?php
$path = CWD;
$site_dir = NULL;
$dpl_dir = NULL;
while ($path != '/') {
if (file_exists($path . '/settings.php')) {
$site_dir = $path;
@dbarbar
dbarbar / setup_codebase.sh
Created November 25, 2013 19:48
Shell script to setup springboard 4 for development.
#!/bin/bash
rm -rf src
drush make https://raw.github.com/JacksonRiver/Springboard-Build/7.x-4.x/springboard.build src
cp -f settings.php src/sites/default
cd src/sites/all/modules
rm -rf springboard
git clone [email protected]:JacksonRiver/springboard_modules.git springboard
@dbarbar
dbarbar / gist:9399443
Last active August 29, 2015 13:57
sf.php
<?php
$batch = array(
'sobjects' => array(
'aobject 0',
'sobject 1',
'sobject 2',
'sobject 3',
'sobject 4',
'sobject 5',