Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# find all .git directories and exec "git pull" on the parent.
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;
@caktux
caktux / ssh_push_key
Created July 18, 2013 03:31
SSH push key
ssh user@host "echo '`cat ~/.ssh/id_rsa.pub`' >> ~/.ssh/authorized_keys"
@caktux
caktux / reset_drupal_cron
Created July 12, 2013 13:02
Reset Drupal cron
drush @ALIAS vdel cron_semaphore
drush @ALIAS vdel cron_last
drush @ALIAS sqlq "delete from semaphore"
@caktux
caktux / disable_module_sql
Created June 11, 2013 13:08
Disable module with SQL
UPDATE `system` SET `status` = '0' WHERE `name` = 'MODULENAME' LIMIT 1;
@caktux
caktux / change_files_directory
Created June 11, 2013 13:07
Change files directory
UPDATE `files` SET `filepath` = REPLACE(`filepath`, "sites/SITEDOMAIN/files/", "files/SITEDOMAIN/");
@caktux
caktux / drush_module_status
Created June 11, 2013 13:03
Find the status of a module in a site list
drush @SITELIST pmi MODULE -y | grep Status