Skip to content

Instantly share code, notes, and snippets.

@winmillwill
winmillwill / Support.md
Created February 1, 2014 19:28 — forked from itendo/Support

Support

Authors

Prometsource

Michelle Krejci, Greg Pamier, Will Milton, Doug Dobrzynski, Matthew Gilboy

Client Paths

@winmillwill
winmillwill / pass_export.sh
Created February 18, 2014 16:30
export environment variables with sensitive values from pass (think aws)
#!/bin/bash
creds=( `pass $1` )
for cred in "${creds[@]}"; do
export $cred;
done
{
"repositories": [{
"type": "composer",
"url": "http://drupal-packagist.org"
}],
"minimum-stability": "alpha",
"require": {
"drupal/panopoly": "7.*"
}
}
@winmillwill
winmillwill / gist:cdb6af0059d4f08196b1
Created August 8, 2014 15:28
tmux config for yanking to clipboard
# Copy mode¬
setw -g mode-keys vi¬
bind ` copy-mode¬
unbind [¬
unbind p¬
bind p paste-buffer¬
bind -t vi-copy H start-of-line¬
bind -t vi-copy L end-of-line¬
bind -t vi-copy v begin-selection¬
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"¬
require 'plist'
name_servers = ['172.17.42.1', '8.8.4.4', '8.8.8.8']
plist_file = '/Library/Preferences/SystemConfiguration/preferences.plist'
plist = Plist::parse_xml(plist_file)
current_set_key = plist['CurrentSet'].split('/').at(-1)
service_key = nil
plist['NetworkServices'].each do |key, dict|
if (addresses = dict['DNS']['ServerAddresses'])
addresses = addresses + (name_servers - addresses)
@winmillwill
winmillwill / ruleset.xml
Created April 3, 2012 15:22
my symfony phpcs ruleset
<?xml version="1.0"?>
<ruleset name="Symfony">
<description>Symfony coding standards code sniffer ruleset.</description>
<rule ref="PEAR">
<exclude name="PEAR.Commenting.FunctionComment"/>
<exclude name="PEAR.Commenting.FileComment"/>
<exclude name="PEAR.Commenting.ClassComment"/>
</rule>
</ruleset>
@winmillwill
winmillwill / silex-mongo-example.php
Created April 5, 2012 16:32
Using the silex-extensions mongo extension
<?php
require __DIR__ . '/vendor/.composer/autoload.php';
$app = new Silex\Application();
$app['autoloader']->registerNamespace('SilexExtension', __DIR__ . '/vendor/fate/silex-extensions/src');
$app->register(new SilexExtension\MongoDbExtension(),
array(
'mongodb.class_path' => __DIR__ . 'vendor/doctrine/mongodb/lib',
'mongodb.connection' => array(
require 'rake/clean'
DRUPAL_ROOT = "#{File.dirname(__FILE__)}/www"
PROJECT = "airbox"
DRUPAL_URI = "#{PROJECT}.dev"
DATABASE_PATH = "archives/current/database.sql"
FILES_PATH = "archives/current/files"
ARCHIVE_DIR = "/var/drupals/archives/#{PROJECT}"
DRUSH_DIR = "#{ENV['HOME']}/.drush"
BUILD_DIR = "build"
@winmillwill
winmillwill / Vagrantfile
Last active December 17, 2015 15:08
Example Vagrantfile for drupal, specifically github.com/promet/drupal_cookbook
Vagrant.configure("2") do |config|
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./Berksfile"
config.vm.box = "squeeze"
config.vm.box_url = "https://s3.amazonaws.com/wa.milton.aws.bucket01/sqeeze.box"
config.ssh.max_tries = 40
config.ssh.timeout = 120
@winmillwill
winmillwill / Berksfile
Created May 22, 2013 16:58
An example Berksfile for local development with vagrant and drupal
site :opscode
cookbook "drupal", git: "https://github.com/promet/drupal_cookbook"
cookbook "solo-helper", git: "https://github.com/glennpratt/solo-helper_cookbook.git"