This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_ca_action(). | |
*/ | |
function webmobilize_ca_action() { | |
$order_arg = array( | |
'#entity' => 'uc_order', | |
'#title' => t('Order'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_ca_action(). | |
*/ | |
function webmobilize_ca_action() { | |
$order_arg = array( | |
'#entity' => 'uc_order', | |
'#title' => t('Order'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_ca_action(). | |
*/ | |
function webmobilize_ca_action() { | |
$order_arg = array( | |
'#entity' => 'uc_order', | |
'#title' => t('Order'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of hook_ca_action(). | |
*/ | |
function webmobilize_ca_action() { | |
$order_arg = array( | |
'#entity' => 'uc_order', | |
'#title' => t('Order'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Screen | |
#Run a task and detach | |
screen -S <Name Your Screen> -d -m <yourcommand> | |
#List screens | |
screen -ls | |
#Attach to a screen | |
screen -r <initials of screen id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- SSH with password | |
- Add alias on bashrc | |
sudo apt-get install sshpass | |
#Then prepend your ssh/scp command with | |
sshpass -p '<password>' <ssh/scp command> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchdog('custom_debug', 'Debug Global User Object for @user_name, user object: !user', array('@' => $user->name, '!node' => '<pre>' . check_plain(print_r($user, TRUE)) . '</pre>'), WATCHDOG_ERROR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
MYSQL="mysql -h <hostname> -u <username> -<password> -D <DATABASENAME>" | |
$MYSQL -BNe "show tables" | awk '{print "set foreign_key_checks=0; drop table `" $1 "`;"}' | $MYSQL | |
unset MYSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchdog('module_name', 'Your Object: !object', array('!object' => '<pre>' . check_plain(print_r($object, TRUE)) . '</pre>'), WATCHDOG_ERROR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_node_insert | |
*/ | |
function mymodulename_node_insert($node) { | |
// Get Node Author. | |
$author = $node->author; | |
// Use Drupal Mail | |
send_mail($to=$author); | |
} |