Skip to content

Instantly share code, notes, and snippets.

View dbarbar's full-sized avatar

David Barbarisi dbarbar

View GitHub Profile
<?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"
*/
@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"
@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
{
"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 / mobile-detect.vcl
Created October 8, 2012 00:13 — forked from elidickinson/mobile-detect.vcl
Varnish config for user agent sniffing
# This file has been modified by Eli Dickinson to update detection rules and to
# send a Vary header downstream. It has also been updated to
# work with newer versions of Varnish.
#
# A simple mobile device detection implementation in VCL
# http://fangel.github.com/mobile-detection-varnish-drupal
#
# The file is based upon initial work done by Audun Ytterdal, which can be
@dbarbar
dbarbar / gist:3833807
Created October 4, 2012 14:20
Sublime Text 2 User Settings file
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"default_line_ending": "unix",
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_size": 26.0,
"highlight_line": true,
"highlight_modified_tabs": true,
@dbarbar
dbarbar / gist:3221225
Created July 31, 2012 22:28
Sample data from AddThis for Most Shared
<?php
$json = <<<EOF
[
{"url":"http://www.fiercewireless.com/story/lowensteins-view-first-mobile-olympics-bronze-medal/2012-07-25?utm_campaign=linkedin-Share-Web#at_pco=cfd-1.0","title":"Lowenstein's View: The first 'mobile' Olympics: bronze medal - FierceWireless"},{"url":"http://www.fiercewireless.com/story/clearwire-sprints-iden-shutdown-affect-small-number-co-located-wimax-sites/2012-07-31?utm_campaign=linkedin-Share-Web#at_pco=cfd-1.0","title":"Clearwire: Sprint's iDEN shutdown to affect 'small number' of co-located WiMAX sites - FierceWireless"},
{"url":"http://www.fiercewireless.com/story/furchtgott-roth-how-restore-growth-america-and-wireless-industry/2012-07-30?utm_campaign=linkedin-Share-Web#at_pco=cfd-1.0","title":"Furchtgott-Roth: How to restore growth in America and in the wireless industry - FierceWireless"},
{"url":"http://www.fiercewireless.com/story/mvno-freedompop-launch-wimax-ipod-touch-case-details-pricing/2012-07-31?utm_campaign=facebook-Share-NL#at_pco=cfd-1.0","title":"MVNO Fr
@dbarbar
dbarbar / gist:3131828
Created July 17, 2012 20:27
Using curl to retrive a JSON URL and decode it.
$apiurl = 'the url';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);
<div align="center">
<iframe width="620" height="450" src="/sample_issue.html">
</iframe>
</div>
'vendorName' .DS . 'libFile.php')); /* Add app view layouts default.ctp */