Skip to content

Instantly share code, notes, and snippets.

mikey-p ~: time lunchy restart memcached
stopped homebrew.mxcl.memcached
started homebrew.mxcl.memcached
real 0m0.128s
user 0m0.085s
sys 0m0.040s
@mikeyp
mikeyp / path_audit.drush.inc
Created July 29, 2014 22:19
Find out what item corresponds to a specific path
<?php
/**
* @file
* Provide Drush integration for finding menu router items.
*/
/**
* Implements hook_drush_help().
*/
function path_audit_drush_help($section) {
@mikeyp
mikeyp / search.sh
Last active September 16, 2016 16:07
BOOM
ag "$@" | peco | awk -F ':' '{print $1 ":" $2}' | xargs pstorm
function branch {
git branch | cut -c 3- | peco | xargs git checkout
}
function proj {
cd $(find ~/git ~/www ~/ex -maxdepth 1 -type d | peco)
}
function proj {
cd $(find ~/git ~/www ~/ex -maxdepth 1 -type d | peco)
}
var assert = require('assert');
var Browser = require('zombie');
describe('example.com cookie', function(){
this.timeout(5000);
describe('tests', function(){
// Set host and create browser
before(function() {
Browser.localhost('127.0.0.1', 4000);
mikey-p ~/git/example-com-cookie (master *): mocha
Example.com cookie
tests
✓ should return a 200 status when loading the test page (5015ms)
✓ should have the correct title (5008ms)
2 passing (10s)
ts := $(shell /bin/date "+%Y%m%d%H%M%S")
root_domain := YOURDOMAINHERE.com
archive_file := ${root_domain}-archive-$(ts)
all: clean generate
clean:
rm -rf *o archive;
rm -rf *o ${root_domain}-archive*.tar.gz;
rm -rf *o ${root_domain}-archive*;
mikey-p ~/git/8/core (8.0.x): php scripts/run-tests.sh --url http://8.dev/ --color --file core/modules/system/src/Tests/Common/FormatDateTest.php
Drupal test run
---------------
Tests to be run:
- Drupal\system\Tests\Common\FormatDateTest
Test run started:
Friday, February 6, 2015 - 13:36
@mikeyp
mikeyp / aliases.drushrc.php
Last active August 29, 2015 14:16
Drush aliases not working
<?php
$aliases['prod'] = array(
'uri' => 'example.org',
'root' => '/var/www/example.org/htdocs',
'remote-host' => 'example.org',
'remote-user' => '316e',
'path-aliases' => array(
'%files' => 'files/',
'%dump-dir' => '/tmp',