Skip to content

Instantly share code, notes, and snippets.

View dbarbar's full-sized avatar

David Barbarisi dbarbar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dbarbar on github.
  • I am dbarbar (https://keybase.io/dbarbar) on keybase.
  • I have a public key ASChtGs1fZ0u2Yv-qu2xUH5LnnorP-1Vi38xlSX378GZ_go

To claim this, I am signing this object:

reference_site.karac >> The following extensions will be disabled: springboard_stats
reference_site.karac >> Do you really want to continue? (y/n):
reference_site.karac >> y
reference_site.karac >> WD php: FieldException: Cannot change an existing field's type. in [error]
field_update_field() (line 234 of
/var/www/springboard-releases/mtsb/7.x-4.6.2-mtsb/modules/field/field.crud.inc).
reference_site.karac >> Cannot modify header information - headers already sent by (output started[warning]
at /usr/share/pear/drush/includes/output.inc:38) bootstrap.inc:1233
reference_site.karac >> FieldException: Cannot change an existing field's type. in field_update_field() (line 234 of /var/www/springboard-releases/mtsb/7.x-4.6.2-mtsb/modules/field/field.crud.inc).
reference_site.karac >> Drush command terminated abnormally due to an unrecoverable error. [error]
@dbarbar
dbarbar / update_springboard.sh
Created February 24, 2015 22:48
update_springboard.sh
#!/bin/bash
# This script downloads the latest 4.x package of Springboard, extracts it to
# docroot, and copies previous git checkouts of the Springboard repos back
# into place. The repos are:
# springboard - modules
# sbsetup - install profile
# springboard_themes - themes
# Existing directory structure:
[1] boris> $period = new DatePeriod(new DateTime('2015-01-31'), new DateInterval('P1M'), 50);
// object(DatePeriod)(
// 'start' => object(DateTime)(
// 'date' => '2015-01-31 00:00:00.000000',
// 'timezone_type' => 3,
// 'timezone' => 'America/New_York'
// ),
// 'current' => NULL,
// 'end' => NULL,
// 'interval' => object(DateInterval)(
@dbarbar
dbarbar / update_springboard.sh
Created December 10, 2014 15:32
update springboard
#!/bin/bash
sudo mv docroot/sites/default .
mv docroot/profiles/sbsetup .
mv docroot/sites/all/modules/springboard .
mv docroot/sites/all/themes/springboard_themes .
sudo rm -rf docroot
mkdir docroot
mv *.tar.gz docroot/
<?php
cache_clear_all();
ctools_include('export');
$displays = array('default', 'block', 'page');
$views = array('sbv_notes', 'sbv_administrators');
$anon = user_load(0);
$admin = user_load(1);
foreach ($views as $view_name) {
$view = ctools_export_crud_load('views_view', $view_name);
@dbarbar
dbarbar / extend.php
Created October 17, 2014 16:47
Extend Litle sustainers via drush scr extend.php
<?php
$extender = new CommerceLitleSustainerExtender();
$extender->run();
class CommerceLitleSustainerExtender {
protected $tableName;
protected $gatewayName;
/**
<?php
$query = 'SELECT stuff FROM {table} WHERE name = :name and nid IN (:nids);';
$condition = array(
"1 ;INSERT INTO {test} SET name = 'test12345678'; -- " => '',
'1' => '',
);
$args = array(
@dbarbar
dbarbar / JunkCept.php
Created October 15, 2014 20:30
./vendor/bin/codecept run acceptance JunkCept.php -d
<?php
$I = new \AcceptanceTester\SpringboardSteps($scenario);
$I->amOnPage('/');
$I->executeInSelenium(function (\Webdriver $webdriver) {
$executor = $webdriver->getCommandExecutor();
$session = $executor->execute('getSession', array());
if ($session['browserName'] == 'phantomjs') {
[drush] Executing 'drush --account-name=admin --account-pass=admin --account-mail=david.barbarisi@jacksonriver.com --clean-url=1 --site-mail=david.barbarisi@jacksonriver.com --site-name=4x --nocolor --root=/var/lib/go-agent/pipelines/Build-4.5/buildscripts/artifacts/src --yes site-install sbsetup'...
Starting Drupal installation. This takes a few seconds ... [ok]
Installation complete. User name: admin User password: admin [ok]
Mcrypt functions found, setting as default encryption method. [status]
The Springboard module was successfully enabled. Please configure [status]
Springboard now.
The Springboard Admin menu has been created. If you need to rebuild [status]
the menu for any reason, visit the Springboard Configuration page.
The Springboard Admin Menu has been rebuilt. [status]
User role Administrator has been created. [status]