Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Happy 😄

Alvaro J. Hurtado Villegas alvar0hurtad0

💭
Happy 😄
View GitHub Profile
View gist:f29de622962d00109444ed36803e7c97
$fields = array(
'item_id',
'revision_id',
// Dodos los campos.
);
$values = array(
'1',
'1',
// Todos los campos.
);
View debug drush
xdebug.remote_host=172.17.0.1
PHP_IDE_CONFIG="serverName=XXXXXXX"
export XDEBUG_CONFIG="idekey=PHPSTORM"
View gist:f8dc7cfee10669104378
/**
* Implements hook_views_post_execute.
*/
function points_of_sale_feature_views_post_execute(&$view){
if ($view->name == 'points_of_sale') {
switch ($view->current_display){
case 'where_to_buy_page':
// Put LOSAN Points of sale on the top of the list.
$temp_result = array();
foreach ($view->result as $key => $item){
View gist:0c8b3cbae7a6e0410f8f
<?php
/**
* File mymodule.drush.inc.php
**/
/**
* Implementation of hook_drush_command().
*/
function mymodule_drush_command() {
$items['mymodule-action'] = array(
'description' => 'Your pretty description to show on drush help',
View gist:4b9f78f5e2ec48e1b9fe
SITES=$(drush sa | grep \.pro)
for site in $(echo $SITES)
do
echo ------------------ $site -------------------------
drush $site status --fields=drupal-version
DRUPAL_PATH = echo $site status --fields=root | cut -d':' -f 2
drush $site ssh "cd $DRUPAL_PATH && git status"
drush $site drupalgeddon-test
done
View gist:0f0e0f4a8be1f1db8c7a
#!/bin/sh
DATE=$(date +%Y-%m-%d)
cd /var/www/campusabbvie/httpdocs/
drush cc all
drush archive-dump --destination=/root/drush-backups/backup-1.tar.gz --tar-options="--exclude=%files/styles/*" --overwrite
mv /root/drush-backups/backup-1.tar.gz /root/drush-backups/day_$DATE.abbvie.tar.gz
s3cmd put /root/drush-backups/day_$DATE.abbvie.tar.gz s3://aspgemsdrupalbackups/day/day_$DATE.abbvie.tar.gz
rm /root/drush-backups/day_$DATE.abbvie.tar.gz