Skip to content

Instantly share code, notes, and snippets.

@Quilted
Quilted / README.md
Last active August 29, 2015 14:06
Patches: frequently used modules not included in drush-git

@font-your-face

Addressfield

  • addressfield-nocountry_option-968112-134.patch
  • Last checkd April 1, 2014.
@Quilted
Quilted / instructions.md
Last active August 29, 2015 14:05
Clone existing Drupal site
  1. Create a new virtual host in MAMP Pro.
  2. Create an empty database ([DATABASE_NAME]) using Sequel Pro or phpMyAdmin.
  3. In your terminal, git clone [REPO]
  4. In your browser, navigate to the new virtual host you created.
  5. In your browser, run through the regular install process as if this were a new site.
  6. In your terminal, cd www.
  7. In your terminal, once the Drupal install is complete, mysql -u root -p [DATABASE_NAME] < ../databases/default.sql
  8. In your terminal, cd www/sites/all/themes/[THEME_NAME].
  9. In your terminal, bundle install.
  10. In your terminal, bundle exec compass compile.
@Quilted
Quilted / setup_sass.patch
Last active August 29, 2015 14:04
Additional setup to omega subtheme
diff --git a/.ruby-version b/.ruby-version
index 77fee73..c82eec7 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-1.9.3
+1.9.3-p448
diff --git a/sass/abstractions/_toolkit.scss b/sass/abstractions/_toolkit.scss
new file mode 100644
index 0000000..ea0535d
@Quilted
Quilted / README.md
Last active August 29, 2015 14:03
Behat: Add a terse formatter

Overview

These files set up another formatter, like 'html', 'pretty', or 'progress', called terse. The terse formatter prints only feature names and scenario names. It does not print tags or steps.

Usage

Use it like any other Behat formatter. For example: bin/behat --format terse This formatter is particularly useful in combination with the --dry-run flag.

Install

@Quilted
Quilted / howtobehat.md
Last active April 21, 2018 10:52
How to setup Drupal extension for Behat

Set up Behat testing for Drupal

(1) Create a tests folder. Perform the following install tasks within that folder unless otherwise specified.

(2) Follow directions to install the Behat Drupal extension.

(3) Add the following lines to the main repo .gitignore:

# Ignore behat files that can be easily initialized

tests/bin

@Quilted
Quilted / _1_sticky_footer.scss
Last active November 1, 2017 20:14
Omega 4 media query and breakpoints files
@Quilted
Quilted / gist:8745428
Last active August 29, 2015 13:55
Install Jenkins on OSX
@Quilted
Quilted / html.preprocess.inc
Created January 28, 2014 22:48
Sticky footer JS and Omega theme code
<?php
// Load the matchMedia polyfill.
if (module_exists('picture') && drupal_get_library('picture', 'matchmedia')) {
$options = array('group' => 'globalgamejam_theme');
// Load the mediaquery behavior from Omega. This allows registering media
// queries via Drupal.settings to automatically print body classes based on
// whether or not they currently apply.
$omega = drupal_get_path('theme', 'omega');
@Quilted
Quilted / gist:8480580
Last active January 3, 2016 15:09
Turn on Jenkins and Selenium
@Quilted
Quilted / Drupal7.php
Created January 17, 2014 02:46
Behat: Support taxonomy term entity references when creating new nodes during testing. Edit vender/drupal/drupalextension/src/Drupal/Driver/Core/Drupal7.php in function exandEntityFields().
// Special handling for entity references.
elseif ('entityreference' === $info['module']) {
$values = explode(',', $value);
// Handle taxonomy terms.
// @todo generalize.
if ($info['settings']['target_type'] == 'taxonomy_term') {
$i = 0;
foreach ($values as $tid) {
$new_entity->{$param}[LANGUAGE_NONE][$i]['target_id'] = $tid;