Skip to content

Instantly share code, notes, and snippets.

View johnrobertwilson's full-sized avatar

John Robert Wilson johnrobertwilson

View GitHub Profile
@johnrobertwilson
johnrobertwilson / gist:3093392
Created July 11, 2012 20:54
alert stakeholders
public function init() {
// Initialize states
$this->create_state('draft', array('label' => t('Draft')));
$this->create_state('draft_review', array('label' => t('Draft, needs review')));
$this->create_state('draft_approved', array('label' => t('Draft, approved')));
$this->create_state('published', array(
'label' => t('Published'),
'on_enter' => array($this, 'on_enter_published'),
));
$this->create_state('published_review', array('label' => t('Published, needs review')));
class drush::files {
file { "/usr/share/pear/drush/drushrc.php":
ensure => present,
source => "puppet:///modules/drush/$environment/drushrc.php",
require => Class["drush::packages"],
}
file { "/usr/share/pear/drush/aliases.drushrc.php":
ensure => present,
source => "puppet://modules/drush/$environment/aliases.drushrc.php",
# Also set up a local DNS entry so that the 'dnsdomainname' fact doesn't
# complain at us.
host { "rh2vagrant" :
ip => "127.0.0.1",
}
# Set up the vhost differently than on rh2dev.
class { "apache" :
http_host => "local.robinhood.org",
http_port => "8080",
cache_clear_all();
$block_records = array(
array(
'module' => 'system',
'delta' => 'main',
'theme' => 'seven',
'visibility' => 1,
'region' => 'dashboard_inactive',
'status' => 1,
'pages' => '',
class robinhood::vhost {
File {
owner => "apache",
group => "apache",
mode => "0755",
require => Class["apache"],
}
file { "/var/www" :
ensure => directory,
<?php
/**
* @file
* EPA implementation of State Flow, an extension of the State Machine class
*/
class EPAWorkflow extends StateFlow {
public function init() {
<?php
/**
* @file
* EPA implementation of State Flow, an extension of the State Machine class
*/
class EPAWorkflow extends StateFlow {
public function init() {
$advisory_nids = db_query('SELECT nid FROM node WHERE type = "advisory_team_bio" OR type = "advisory_group_organization")->fetchCol();
$advisory_nodes = node_load_multiple($advisory_nids);
foreach ($advisory_nodes as $advisory_node) {
node_save($advisory_node);
}
first one:
a:1:{s:5:"stats";a:1:{s:13:"vertical_tabs";a:1:{i:0;a:1:{s:8:"fieldset";a:1:{s:4:"icon";a:1:{s:8:"file_fid";s:3:"537";}}}}}}
second one:
a:2:{s:5:"stats";a:1:{s:13:"vertical_tabs";a:29:{i:0;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 0";}s:11:"description";a:1:{s:8:"textarea";s:82:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod. 0";}s:4:"icon";a:1:{s:8:"file_fid";a:4:{s:3:"fid";i:0;s:13:"upload_button";s:6:"Upload";s:13:"remove_button";s:6:"Remove";s:6:"upload";N;}}}}i:1;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 1";}s:11:"description";a:1:{s:8:"textarea";s:82:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod. 1";}s:4:"icon";a:1:{s:8:"file_fid";a:4:{s:3:"fid";i:0;s:13:"upload_button";s:6:"Upload";s:13:"remove_button";s:6:"Remove";s:6:"upload";N;}}}}i:2;a:1:{s:8:"fieldset";a:3:{s:5:"title";a:1:{s:9:"textfield";s:17:"City Stat Title 2";}s:11:"description";a:1:{s
$databases = array(
'default' => array(
'default' => array(
'driver' => 'mysql',
'database' => 'robinhood',
'username' => 'root',
'password' => '',
'host' => 'localhost',
),
),