This file contains hidden or 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 | |
/** | |
* Extract a list of all available Organic Groups. | |
* | |
* This is ugly and inefficient, but it is the only way | |
* I could figure out how to do it, but hey it works. | |
* | |
* This is designed to work with OG 7.x-2.x | |
* |
This file contains hidden or 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_menu(). | |
*/ | |
function deploy_services_client_menu() { | |
$items = array(); | |
//$items['job/%wf_job/diff/entities'] = array( | |
// dev hack | |
$items['job/123/diff/entities'] = array( |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>SSH Link Test</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<p><a href="ssh://[email protected]">click me</a></p> | |
</body> | |
</html> |
This file contains hidden or 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 | |
/** | |
* Example settings.php which supports per environment configs on different hosting platforms. | |
*/ | |
$include = ''; | |
// Pantheon | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) { | |
$include = __DIR__ . "/config/settings.{$_SERVER['PANTHEON_ENVIRONMENT']}.php"; | |
} |
This file contains hidden or 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
UPDATE deploy_manager_entities dme | |
JOIN ( | |
SELECT br.bid, MAX(br.vid) max_vid | |
FROM bean_revision br | |
INNER JOIN deploy_manager_entities dme | |
ON br.bid = dme.entity_id | |
GROUP BY br.bid | |
) b | |
ON b.bid = dme.entity_id | |
SET dme.revision_id = b.max_vid |
This file contains hidden or 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 | |
# | |
# Git pre-commit hook for Drupal projects. | |
# Created by Dave Hall - http://davehall.com.au | |
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
# | |
set -e |
This file contains hidden or 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 -e | |
# | |
# Git pre-commit hook that blocks commits for files that contain swear words. | |
# | |
# Created by Dave Hall - http://davehall.com.au | |
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
# | |
# Please don't use this fucking script, it is shit! | |
# |
This file contains hidden or 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
if (!empty($_ENV['AH_SITE_ENVIRONMENT'])) { | |
$conf['composer_manager_file_dir'] = "/var/www/html/{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}/docroot/sites/default/files/composer"; | |
$conf['composer_manager_vendor_dir'] = "{$conf['composer_manager_file_dir']}/vendor"; | |
} |
This file contains hidden or 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 | |
/* | |
If you have a large number of existing files then you will want | |
to implement batch in hook_update_N(). I didn't need that so it | |
isn't implemented here. If you need it read this article | |
http://bleen.net/blog/running-batch-processes-update-hook-bed | |
*/ | |
/** |
This file contains hidden or 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 | |
$type = 'rules_config'; | |
$query = new EntityFieldQuery(); | |
$rules = $query->entityCondition('entity_type', $type) | |
->execute(); | |
if (!$rules) { | |
return; | |
} |