View run.sh
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
#/ Usage:
#/ Description:
#/ Examples:
#/ Options:
#/ --help: Display this help message
usage() { grep '^#/' "$0" | cut -c4- ; exit 0 ; }
View goenv.sh
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
#/ Usage: source ./goenv.sh
#/ Description: Adjusts GOPATH environment variable to support multiple workspaces.
#/ Inspired by https://github.com/dgnorton/goenv/blob/master/goenv.sh
#/ Options:
#/ --help: Display this help message
usage() { grep '^#/' "$0" | cut -c4- ; exit 0 ; }
View aws-get-elb-cloudfront-ips.sh
# Region: Sydney (ap-southeast-2)
# Service: ELBs.
curl -ss https://ip-ranges.amazonaws.com/ip-ranges.json | jq -arM -c '.prefixes[] | select(.region | contains("ap-southeast-2")) | select(.service | contains("AMAZON")) | .ip_prefix' | tee results.txt
# Region: Sydney (ap-southeast-2)
# Service: CloudFront.
curl -ss https://ip-ranges.amazonaws.com/ip-ranges.json | jq -arM -c '.prefixes[] | select(.region | contains("ap-southeast-2")) | select(.service | contains("CLOUDFRONT")) | .ip_prefix' | tee -a results.txt
# Region: Global
# Service: CloudFront.
View pr.md.txt
#### What does this PR do?
#### Where should the reviewer start?
#### How should this be manually tested?
#### Any background context you want to provide?
#### What are the relevant tickets?
View fork-example.php
<?php
/**
* @file
* Basic demonstration of how to do parallel threads in PHP.
*/
// This array of "tasks" could be anything. For demonstration purposes
// these are just strings, but they could be a callback, class or
// include file (hell, even code-as-a-string to pass to eval()).
View template.php
<?php
/**
* Implements hook_bootstrap_colorize_text_alter().
*/
function theme_bootstrap_colorize_text_alter(&$texts) {
// The webform submit buttons should always have the bootstrap 'btn-primary'
// class. This section fetches a list of configured submit button texts and
// adds it into the $texts['matches'] array.
$cid = 'theme_name:webform_submit_text';
View mydumper-install-ubuntu14.04.sh
# Switch to root user.
sudo su -
# Update apt repositories and install dependencies.
apt-get update
apt-get install libglib2.0-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev libssl-dev cmake
# Download mydumper source and move to appropriate directory.
cd /usr/local/share
wget https://launchpad.net/mydumper/0.9/0.9.1/+download/mydumper-0.9.1.tar.gz
View mccoa.htaccess
# -----------------------------------------------------------------------------
# Manningham Intranet - Customizations.
<IfModule mod_rewrite.c>
RewriteEngine on
# Redirect bare domain to www. prefixed hostname.
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTP_HOST} ^intranet\.manningham\.vic\.gov\.au [NC,OR]
View example.module
<?php
/**
* @file
*
* Replaces all of the panels content categories with a single "All" tab.
*
* To enable, simply do the following:
* - Search & replace "example" with your module name.
* - Run `drush vset example_panels_all_category 1`
View gist:3952025
/**
* Disable the continue buttons in the checkout process once they are clicked
* and provide a notification to the user.
*/
Drupal.behaviors.aibmCommerceCheckout = {
attach: function (context, settings) {
...
var creditCardSelection = $('#edit-commerce-payment-payment-details-credit-card-type', context);
if (creditCardSelection.length) {