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
# bump_versions.py | |
# A simple script to bump version numbers based on a release branch | |
# @author Kosta Harlan | |
# Usage: `python resources/bump_versions.py` | |
from os import remove, close | |
import os | |
import fileinput | |
from sys import exit | |
from tempfile import mkstemp |
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
// Site specific options | |
$options['destination'] = 'sites/all/modules/contrib'; |
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
# This script facilitates obtaining the latest DB data from the production | |
# Drupal 5 site. | |
# The script gets an ordered dump of the D5 database, and commits it to the | |
# [email protected]:mysite_d5.git repository master branch. | |
# We make use of the rebuild.config file, so please make sure that your | |
# settings are correct there! | |
# We also assume that your drush aliases are setup correctly for | |
# @mysite.dev and @mysite_d5.prod. Please check mysite.aliases.drushrc.example, | |
# make sure your @mysite.dev alias is set up correctly, rename the file | |
# to mysite.aliases.drushrc.php and move it into your ~/.drush directory. |
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 | |
#!/usr/bin/env drush | |
// Example rebuild script | |
// local alias | |
$self_record = drush_sitealias_get_record('@self'); | |
$self_name = '@' . $self_record['#name']; |
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
<snippet> | |
<content>< | |
DRUPAL_PATH=${1%/} | |
DRUPAL_USER=${2} | |
APACHE_GROUP="www-data" | |
HELP="\nHELP: This script is used to fix permissions of a drupal installation\nyou need to provide the following arguments:\n\t 1) path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\nNote: \"www-data\" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this script\n\nUsage: (sudo) bash ${0##*/} drupal_path user_name\n" | |
if [ -z "${DRUPAL_PATH}" ] || [ ! -d "${DRUPAL_PATH}/sites" ] || [ ! -f "${DRUPAL_PATH}/modules/system/system.module" ]; then |
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 ( isset( $wp_query -> query_vars['is_past'] ) ) { | |
$url = bloginfo('url'); | |
echo <a href=sprintf("%s/events/", $url)><h4>View Upcoming Events</h4></a>; | |
else { | |
echo <a href=sprintf("%s/events/past/", $url)><h4>View Past Events</h4></a>; | |
} | |
?> |
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 | |
$url = get_bloginfo('url'); | |
if ( isset( $wp_query -> query_vars['is_past'] ) ) | |
{ | |
$path = sprintf('<a href=%s/events/><h4>View Upcoming Events</h4></a>', $url); | |
echo $path; | |
} | |
else | |
{ | |
echo '<a href=sprintf("%s/events/past/", $url)><h4>View Past Events</h4></a>'; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
var uri = casper.cli.get('uri'); | |
var link = 'http://' + uri; | |
var alias = casper.cli.get('alias'); | |
var drush = 'http://localhost:8888/' + alias + ' '; | |
var repo_dir = casper.cli.get('repo'); | |
casper.test.begin('Setup methods for test suite', function suite(test) { | |
// Begin setUp(). | |
casper.start(drush + 'core-status --format=json', function() { |
OlderNewer