Skip to content

Instantly share code, notes, and snippets.

@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 / .lando.yml
Last active June 4, 2021 16:10 — forked from dustinleblanc/.lando.yml
Pantheon Build Tools with Lando Behat Testing
name: some-site
recipe: pantheon
config:
framework: drupal8
env: dev
site: some-site
id: some-uuid-string-here
drush: 8.3
php: '7.3'
webroot: web
@generalredneck
generalredneck / headless-testing.pp
Created July 20, 2012 15:42
headless-testing.pp
class apci_devel::headless_testing {
include java
package { "xvfb":
ensure => present,
}
package { "firefox":
ensure => present,
}
@generalredneck
generalredneck / appraisal.json
Created February 14, 2018 18:23
Example data from the appraisal of item 0
{
"issueId": 0,
"publishedProductValueId": 0,
"options": [
{
"optionDescription": "String",
"publishedOptionValueId": 0,
"optionValue": 0,
"defaultQuantity": 0,
"extendedValue": 0,
@generalredneck
generalredneck / gist:44875680786c6ca6cd6713aa5e5adb7d
Last active October 23, 2017 19:04 — forked from heathdutton/gist:cc29284de3934706acd1
Start an Acquia drush command, and wait for it to complete before continuing.
#!/bin/bash
# Runs an acquia task, and waits for the task to complete before continuing.
# This is a helper script, to be used in others as needed.
#
# @see https://gist.github.com/heathdutton/cc29284de3934706acd1
if [[ $1 = "" ]] || [[ $2 = "" ]]
then
echo "Runs an acquia drush command, waiting for the results before continuing."
echo "Can be used as a replacement for drush."
@generalredneck
generalredneck / console.txt
Created September 27, 2017 19:57
console output
allan@ThinkPad-T470:~/workspace/elccs-new-curriculum (elnc-267)
$ terminus drush elccs-new-curriculum.elnc-267 -- stage
[warning] This environment is in read-only Git mode. If you want to make changes to the codebase of this site (e.g. updating modules or plugins), you will need to toggle into read/write SFTP mode first.
The authenticity of host '[appserver.elnc-267.2f47c3e9-ef82-47c8-bce8-c34728a4da6d.drush.in]:2222 ([130.211.234.231]:2222)' can't be established.
RSA key fingerprint is SHA256:yPEkh1Amd9WFBSP5syXD5rhUByTjaKBxQnlb5CahZZE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[appserver.elnc-267.2f47c3e9-ef82-47c8-bce8-c34728a4da6d.drush.in]:2222,[130.211.234.231]:2222' (RSA) to the list of known hosts.
Running Registry Rebuild
The registry has been rebuilt via registry_rebuild (A). [success]
@generalredneck
generalredneck / console.txt
Created September 22, 2017 14:50
drupal-vm failure
$ vagrant up
Bringing machine 'local.woodmagazine.com' up with 'virtualbox' provider...
==> local.woodmagazine.com: Checking if box 'geerlingguy/ubuntu1404' is up to date...
==> local.woodmagazine.com: Clearing any previously set forwarded ports...
==> local.woodmagazine.com: Clearing any previously set network interfaces...
==> local.woodmagazine.com: Preparing network interfaces based on configuration...
local.woodmagazine.com: Adapter 1: nat
local.woodmagazine.com: Adapter 2: hostonly
==> local.woodmagazine.com: Forwarding ports...
local.woodmagazine.com: 22 (guest) => 2222 (host) (adapter 1)
@generalredneck
generalredneck / .emdaer.yml
Created September 5, 2017 20:38
Readme for my test project
- text: '# Manual Pantheon Project'
- text: "This is a brief overview of my manual Pantheon Project located at https://github.com/fourkitchens/readmes/tree/master/pantheon/d7/manual"
- include: './node_modules/readmes/pantheon/d7/manual/at-a-glance.md'
- include: './node_modules/readmes/pantheon/d7/manual/brief-foundation-architecture.md'
- include: './node_modules/readmes/pantheon/d7/manual/before-you-start.md'
- include: './node_modules/readmes/pantheon/d7/manual/getting-started.md'
- include: './node_modules/readmes/pantheon/d7/manual/subsequent-builds.md'
- include: './node_modules/readmes/pantheon/d7/manual/git-workflow.md'
- include: './node_modules/readmes/pantheon/d7/manual/configuration-management-workflow.md'
- include: './node_modules/readmes/pantheon/d7/manual/deployment.md'
<div class="views-row views-row-2 views-row-even">
<span class="field-featured-image"><a href="/video/sf-engine-man-remove-sludge-from-diesel-fuel-storage-tank">
<div class="field-featured-image">
<span class="field-featured-image"></span>
<article class="node node-image contextual-links-region default clearfix" id="node-261570" role="article">
<span class="field-featured-image"></span>
<div class="content">
<span class="field-featured-image"></span>
<div class="image-wrapper">
<span class="field-featured-image"></span>