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
; $Id$ | |
name = Your_Module Webform options | |
description = Preset options for Your_Module webform fields | |
package = "Your_Module" | |
project = Your Project | |
core = 6.x | |
version = 6.x-1.0 |
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
; $Id$ | |
name = Custom Form dependant dropdown | |
description = Dropdown dependant form | |
project = Dependant dropdown | |
core = 6.x | |
version = 6.x-1.0 |
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
/** | |
* Competition list | |
* | |
*/ | |
function mymodule_competitions_results_list_competitions(){ | |
// Main sql | |
$sql = "SELECT * FROM `node` WHERE type='webform' LIMIT 0,30 "; |
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 | |
drush_print( 'Deleting nodes created by user'); | |
// Select nodes from offending user | |
$result = db_query("SELECT * FROM node WHERE node.uid=27216 AND node.type='group_node' LIMIT 0,50000"); | |
$number_deleted = 0; | |
while( $row = db_fetch_array( $result ) ) { | |
echo "\n\n node :: " ; |
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
/** | |
* Creates and starts client download of the distribution email. | |
*/ | |
function module_download() { | |
// Header sets content type to HTML. | |
$render = '<head> | |
<title>EDM- </title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
</head> |
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 | |
/** | |
* Created by PhpStorm. | |
* User: Alex Moreno | |
* Date: 16/03/2014 | |
* Time: 16:19 | |
*/ | |
namespace CruiseHunter; |
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
curl -sS https://getcomposer.org/installer | php; | |
sudo mv composer.phar /usr/bin/ | |
vim ~/.bash_profile | |
# add this in ~/.bash_profile | |
# alias composer="php /usr/bin/composer.phar" | |
# reboot console | |
# Original post: http://www.abeautifulsite.net/blog/2013/09/installing-composer-on-os-x/ |
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
# git alias | |
alias gitlg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
alias proxyon="export http_proxy='YOUR-PROXY:YOUR-PROXY-PORT'; export https_proxy='YOUR-PROXY:YOUR-PROXY-PORT'" | |
alias proxyoff="export http_proxy='';export https_proxy=''" |
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 | |
/** | |
* Implements hook_context_plugins(). | |
*/ | |
function mymodule_context_plugins() { | |
$plugins = array(); | |
// Pre search context. | |
$plugins['mymoduleContextConditionPreSearch'] = array( | |
'handler' => array( |
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
DB_BACKUP_PATH="$(pwd)/$(ls -t | grep \.sql\.gz$ | head -n1)" | |
echo $DB_BACKUP_PATH |
OlderNewer