Skip to content

Instantly share code, notes, and snippets.

View jhedstrom's full-sized avatar

Jonathan Hedstrom jhedstrom

  • Phase2
  • Portland, OR
View GitHub Profile
@jhedstrom
jhedstrom / gist:1126323
Created August 4, 2011 21:26
programme with and w/o session status
Overall Summary (w/o session status)
Total Incl. Wall Time (microsec): 7,190,421 microsecs
Total Incl. CPU (microsecs): 3,648,228 microsecs
Total Incl. MemUse (bytes): 32,225,616 bytes
Total Incl. PeakMemUse (bytes): 33,973,720 bytes
Number of Function Calls: 321,664
Overall Summary (w/ session status)
Total Incl. Wall Time (microsec): 5,626,672 microsecs
Total Incl. CPU (microsecs): 4,224,264 microsecs
@jhedstrom
jhedstrom / gist:1386627
Created November 22, 2011 19:21
Webform node via profiler syntax (7.x)
nodes[contact][type] = webform
nodes[contact][title] = Contact
nodes[contact][body][und][0][value] = 'TODO'
nodes[contact][body][und][0][format] = full_html
nodes[contact][uid] = 1
nodes[contact][language] = und
nodes[contact][menu][enabled] = 1
nodes[contact][menu][link_title] = Contact
nodes[contact][menu][menu_name] = user-menu
nodes[contact][menu][weight] = 42
All necessary changes to sites/default and sites/default/settings.php have been made, so you should remove write [warning]
permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the online handbook.
'all' cache was cleared [success]
No database updates required [success]
Finished performing updates. [ok]
Features Features (features) Module Enabled 83e0a6c
Testing Features Tests (features_test) Module Not installed 83e0a6c
The drush command 'fra' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if
@jhedstrom
jhedstrom / deploy.drushrc.php
Created April 13, 2012 19:45
Drush Deploy with a make file
$options['before']['deploy-symlink'][] = 'run_rebuild_task';
/**
* Run rebuild.sh.
* @task
*/
function run_rebuild_task($d) {
$d->run('cd %s/app && ./rebuild.sh', $d->release_path);
$d->run('ln -s %s/settings.php %s/sites/default/settings.php', $d->shared_path, $d->latest_release());
$d->run('ln -s %s/files %s/sites/default/files', $d->shared_path, $d->latest_release());
/**
* Implements hook_process_zone().
*/
function streetroots_process_zone(&$vars) {
if ($vars['elements']['#zone'] == 'content') {
$vars['breadcrumb'] = FALSE;
}
}
/**
@jhedstrom
jhedstrom / gist:3170999
Created July 24, 2012 16:23
Potential composer.json for DrupalExtension
{
"name": "behat/drupal-extension",
"type": "behat-extension",
"description": "Drupal extension for Behat",
"keywords": ["drupal", "web", "test"],
"homepage": "http://drupal.org/project/drupalextension",
"license": "GPL 2",
"require": {
"behat/mink": "1.4@stable",
"behat/mink-goutte-driver": "*",
@jhedstrom
jhedstrom / gist:3645288
Created September 5, 2012 21:38
Sample HTML form indicating failed empty file uploads problem in Goutte
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
<title>Create Project | git6site.devdrupal.org</title>
<link type="text/css" rel="stylesheet" media="all" href="http://git6site.devdrupal.org/files/css/css_72384a9b3a77f108ecea6d7ec0b64b1
6.css" />
<script type="text/javascript" src="http://git6site.devdrupal.org/files/js/js_a7d7d8bf2ceadb7829010bc94589f34f.js"></script>
default:
paths:
features: 'features'
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: http://local:8888/d7_dev
Drupal\DrupalExtension\Extension:
blackbox: ~
default:
paths:
features: 'features'
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: http://d7.dev
show_cmd: "firefox %s"
Drupal\DrupalExtension\Extension:
pre {
padding: 10px;
background-color: #4c4c4c;
color: #efefef;
}