Skip to content

Instantly share code, notes, and snippets.

View davidlukac's full-sized avatar

David Lukac davidlukac

View GitHub Profile
@davidlukac
davidlukac / append-timestamp-drush.sh
Last active March 22, 2016 14:33
Shell - related
# The snippet ads timestamp to every line of the output.
drush @site.aloas solr-index | awk -v now="$(date +"%Y-%m-%d %r")" '{ print now ":\n" $0; fflush(); }' | tee -a drush-index.log`
@davidlukac
davidlukac / parseAllModules
Last active August 29, 2015 14:19
Parse enabled modules from modules pages (Drupal 7.x; /admin/modules)
var module = '';
jQuery.each(jQuery('#system-modules tr'), function(index, value) {
if (jQuery( this).find('.form-checkbox').val() == 1) {
module = module + '\n' + jQuery(this).find('strong').text() + ',' + jQuery( this).find('td:nth-child(3)').text();
}
});
console.log(module);