Skip to content

Instantly share code, notes, and snippets.

Reading ./composer.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Loading composer repositories with package information
Downloading http://static.drupal-packagist.org/v0.1.0/packages.json
Writing /home/vagrant/.composer/cache/repo/http---static.drupal-packagist.org-v0.1.0/packages.json into cache
Downloading https://packagist.org/packages.json
Writing /home/vagrant/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
@generalredneck
generalredneck / my_views.module
Created July 11, 2014 19:28
Sample Custom Views Module
<?php
/**
* Implements hook_views_data.
* @see https://api.drupal.org/api/drupal/core!modules!views!views.api.php/function/hook_views_data/8
*/
function my_views_views_data() {
// Note this will look very familiar.
// For the table defined as such:
@generalredneck
generalredneck / CI Blog.md
Last active December 23, 2015 08:39
Continuous Integration Applied to Business Blog post explaining how CI benefits business.

Continuous Integration Applied to Business

As a Developer, it's easy to get caught up in the every day life of development without taking a step back and looking at the big picture of why/how the business works. In reality though, every bit I do as a developer: the code quality, the time I spend, and the visual work I can show, all impact business for our company. Continuous Integration (CI) helps me as a developer help business by providing tools that fulfill those necessities. In order to understand how CI provides quaility code, effeciency, and shows prowess as a development company, you must understand what CI is exactly, and get a brief overview of how developers use these tools to make the day to day business run smoothly.

What is Continuous Integration

There are several common misconceptions about what Continuous Integration actually is. When you hear about it in your favorite blog or in passing, you hear about *Automat

<?php
return array(
'zfcrbac' => array(
'firewalls' => array(
'ZfcRbac\Firewall\Controller' => array(
array('controller' => 'index', 'actions' => 'index', 'roles' => 'guest')
),
'ZfcRbac\Firewall\Route' => array(
array('route' => 'profiles/add', 'roles' => 'member'),
array('route' => 'admin/*', 'roles' => 'administrator')
Nov 21 10:33:38 a kernel: [ 70.050361] mysqld: sending ioctl 4004fecd to a partition!
Nov 21 10:33:38 a kernel: [ 70.050367] mysqld: sending ioctl 4004fecd to a partition!
Nov 21 10:33:38 a kernel: [ 70.050370] mysqld: sending ioctl 4004fecd to a partition!
Nov 21 10:33:41 a /etc/mysql/debian-start[2408]: Upgrading MySQL tables if necessary.
Nov 21 10:33:41 a /etc/mysql/debian-start[2412]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Nov 21 10:33:41 a /etc/mysql/debian-start[2412]: Looking for 'mysql' as: /usr/bin/mysql
Nov 21 10:33:41 a /etc/mysql/debian-start[2412]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Nov 21 10:33:41 a /etc/mysql/debian-start[2412]: Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--host=localhost' '--socket=/var/run/mysqld/mysqld.sock' '--host=localhost' '--socket=/var/run/mysqld/mysqld.sock'
Nov 21 10:33:41 a /etc/mysql/debian-start[2412]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for use
@generalredneck
generalredneck / gist:3980181
Created October 30, 2012 13:28
Selenium log snipped
Starting test 'AllPlayers\Tests\Store\Selenium\GroupStore\Affiliate\ProductForRegistrationTest::testRegisterForAffiliateGroup'.
Screenshot: http://a.hudson.allplayers.com/screenshots/mercury/store/1351562697_www_mercury_dev_allplayers_com___ProductForRegistrationTest_testRegisterForAffiliateGroup/1351562818.9252_Failure.png
Current URL: https://store.mercury.dev.allplayers.com/checkout/1598/payment
Screenshot: http://a.hudson.allplayers.com/screenshots/mercury/store/1351562697_www_mercury_dev_allplayers_com___ProductForRegistrationTest_testRegisterForAffiliateGroup/1351562818.9252_Failure.png
Failed command: assertTextPresent('Checkout complete')
Failed asserting that false is true.
drush sql-sync --no-ordered-dump -y @demo2store @seleniumstore
You will destroy data from seleniumstore and replace with data from store.
You might want to make a backup first, using the sql-dump command.
Do you really want to continue? (y/n): y
drush @seleniumstore upwd `drush @selenium vget apci_store_user | grep -P -o "(?<=\").*(?=\")"` --password=`drush @selenium vget apci_store_pass | grep -P -o "(?<=\").*(?=\")"`
require_once(/mnt/apci/selenium-store/www/profiles/apci_store/modules/contrib/memcache/memcache.inc): failed to open stream: No such file or directory [warning]
bootstrap.inc:2297
@generalredneck
generalredneck / xpath.php
Created September 27, 2012 18:12
XPath - A Fun Walk With A Powerful Query Language
<?php
require_once 'Console/Table.php';
$groupsDoc = new DOMDocument();
$groupsDoc->load("groups.xml");
$groupsDoc->formatOutput = TRUE;
file_put_contents("readable-groups.xml",$groupsDoc->saveXML());
$xpath = new DOMXpath($groupsDoc);
/*******************************************************************************
@generalredneck
generalredneck / products.html
Created September 18, 2012 18:39
simple test
<html>
<head>
<style>
div.product {
height:100px;
width:100px;
border: 1px solid black;
background-color:yellow;
float:left;
}
@generalredneck
generalredneck / keepsgoing.log
Created September 11, 2012 14:59
Selenium log snipped
07:03:45.493 INFO - Command request: waitForPageToLoad[90000, ] on session be710e83a2684c4a934f8663dbe376a9
07:03:45.525 INFO - Got result: OK on session be710e83a2684c4a934f8663dbe376a9
07:03:45.529 INFO - Command request: getExpression[(typeof selenium.browserbot.getCurrentWindow().jQuery == 'undefined' || !selenium.browserbot.getCurrentWindow().jQuery.active), ] on session be710e83a2684c4a934f8663dbe376a9
07:03:45.543 INFO - Got result: OK,(typeof selenium.browserbot.getCurrentWindow().jQuery == 'undefined' || !selenium.browserbot.getCurrentWindow().jQuery.active) on session be710e83a2684c4a934f8663dbe376a9
07:03:45.546 INFO - Command request: waitForCondition[(typeof selenium.browserbot.getCurrentWindow().jQuery == 'undefined' || !selenium.browserbot.getCurrentWindow().jQuery.active), 90000] on session be710e83a2684c4a934f8663dbe376a9
07:03:45.572 INFO - Got result: OK on session be710e83a2684c4a934f8663dbe376a9
07:03:45.576 INFO - Command request: getExpression[xpath=//label[contains(text(), 'Enable regi