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
$action_name = 'r2d2'; | |
$rules = rules_config_load_multiple(FALSE); | |
foreach ($rules as $rule) { | |
if (get_class($rule) == 'RulesReactionRule') { | |
foreach ($rule->actions() as $action) { | |
if (get_class($action) == 'RulesAction') { | |
if (($action->getElementName() == $action_name) && ($rule->active == 1)) { | |
return 'that was the droid you were looking for'; | |
} |
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
#!/usr/bin/env bash | |
#################### | |
# | |
# Wrapper script to manage virtual machines in rackspace using nova-client & rackspace api v2 | |
# Author: Ashrith | |
# | |
#################### | |
##NOVA AUTH VARIABLES | |
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.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
# Drush login function dli | |
# ------------------------ | |
# | |
# Open the given site in the browser, login as root, and go to destination | |
# argument. Requires the -l option, or drush site-set @alias, or $options['l'] | |
# in sites/default/bashrc.php | |
# | |
# Usage | |
# ----- | |
# |
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 | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
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
def versions = [] | |
def f = new File('mock-version-tags.txt') | |
f.eachLine { versions << it } | |
def versionComparator = { a, b -> | |
def VALID_TOKENS = /._/ | |
a = a.tokenize(VALID_TOKENS) | |
b = b.tokenize(VALID_TOKENS) | |
for (i in 0..<Math.max(a.size(), b.size())) { |
NewerOlder