Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Coyle kevin-coyle

View GitHub Profile
View install_drush.sh
#! /bin/bash
wget http://files.drush.org/drush.phar
chmod +x drush.phar
sudo mv drush.phar /usr/local/bin/drush
drush init
View gist:f68ccf53ee1f369a40fa
until nc -z mysql 3306; do
echo "$(date) - waiting for database to be up..."
sleep 1
done
View gist:9ce88cefda90471cb35b
wget -r --convert-links --html-extension http://example.com
@kevin-coyle
kevin-coyle / isDrupalUp.sh
Created Sep 18, 2015
Check Drupal is Up and put it into a BASH variable
View isDrupalUp.sh
UP=`drush status | grep "Drupal bootstrap" | awk '{print $4}'`
@kevin-coyle
kevin-coyle / gist:6839e59d4c8efce5af06
Last active Aug 29, 2015
Respond JS IE8 flash of unstyled content hack.
View gist:6839e59d4c8efce5af06
.container {
display: none;
}
@media (min-width: 1px) {
.container {
display: block;
}
}
View 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 Jan 21, 2014
Modified from http://dcycleproject.org/blog/32/disabling-blocks A simple helper function to disable blocks programatically. Useful for deployment modules.
View Disable Block Programmatically
/**
* 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(