Skip to content

Instantly share code, notes, and snippets.

@kevin-coyle
kevin-coyle / install_drush.sh
Created April 4, 2016 13:51
Installing Drush
#! /bin/bash
wget http://files.drush.org/drush.phar
chmod +x drush.phar
sudo mv drush.phar /usr/local/bin/drush
drush init
until nc -z mysql 3306; do
echo "$(date) - waiting for database to be up..."
sleep 1
done
@kevin-coyle
kevin-coyle / gist:9ce88cefda90471cb35b
Created February 15, 2016 16:04
Scrape site with wget
wget -r --convert-links --html-extension http://example.com
@kevin-coyle
kevin-coyle / isDrupalUp.sh
Created September 18, 2015 20:48
Check Drupal is Up and put it into a BASH variable
UP=`drush status | grep "Drupal bootstrap" | awk '{print $4}'`
@kevin-coyle
kevin-coyle / gist:6839e59d4c8efce5af06
Last active August 29, 2015 14:25
Respond JS IE8 flash of unstyled content hack.
.container {
display: none;
}
@media (min-width: 1px) {
.container {
display: block;
}
}
@kevin-coyle
kevin-coyle / README.md
Last active August 29, 2015 14:23 — forked from haggen/README.md

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@kevin-coyle
kevin-coyle / Disable Block Programmatically
Created January 21, 2014 14:03
Modified from http://dcycleproject.org/blog/32/disabling-blocks A simple helper function to disable blocks programatically. Useful for deployment modules.
/**
* Helper Function to disable blocks
* Modified from http://dcycleproject.org/blog/32/disabling-blocks
* @param string $theme The name of the theme you'd like the block to be disabled on
* @param array $blocks Array of blocks. Module => Block name
*/
function disable_block($theme, $blocks) {
foreach ($blocks as $module => $delta) {
$num_updated = db_update('block') // Table name no longer needs {}
->fields(array(