Skip to content

Instantly share code, notes, and snippets.

View alvar0hurtad0's full-sized avatar
💭
Happy 😄

Alvaro J. Hurtado Villegas alvar0hurtad0

💭
Happy 😄
View GitHub Profile
$fields = array(
'item_id',
'revision_id',
// Dodos los campos.
);
$values = array(
'1',
'1',
// Todos los campos.
);
xdebug.remote_host=172.17.0.1
PHP_IDE_CONFIG="serverName=XXXXXXX"
export XDEBUG_CONFIG="idekey=PHPSTORM"
/**
* 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){
<?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',
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
#!/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