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
# -*- coding: utf-8 -*- | |
"""Calculate the current package version number based on git tags. | |
If possible, use the output of “git describe” modified to conform to the | |
versioning scheme that setuptools uses (see PEP 386). Releases must be | |
labelled with annotated tags (signed tags are annotated) of the following | |
format: | |
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ] |
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/sh | |
# | |
# Author:: Jono Wells ([email protected]) | |
# http://oj.io | |
# Encrypt AWS creds for travis-ci | |
# | |
# Copyright 2014, Jono Wells | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. |
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
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
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
var casper = require('casper').create(); | |
var webpage = "http://wordpress.org/"; | |
casper.on('resource.requested', function(resource) { | |
for (var obj in resource.headers) { | |
var name = resource.headers[obj].name; | |
var value = resource.headers[obj].value; | |
if (name == "User-Agent"){ |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "An etcd cluster based off an auto scaling group", | |
"Mappings" : { | |
"RegionMap" : { | |
"eu-central-1" : { | |
"AMI" : "ami-ffafb293" | |
}, | |
"ap-northeast-1" : { | |
"AMI" : "ami-dae8c1b4" |
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
# AWS Cloudwatch Logs install documentation: | |
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/QuickStartEC2Instance.html | |
# By defining this IAM Role Policy in a module, it can be referenced anywhere it is required | |
# for an IAM Role. This is preferrable to copy/pasting the IAM Policy statement because changes | |
# made to this role will automatically apply to all IAM Roles referencing this module. | |
### | |
# Variables | |
### |
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
# define some variables | |
variable "aws_ubuntu_ami" { | |
default = "ami-972444ad" | |
} | |
variable "aws_keypair" { | |
default = "xxxx" | |
} | |
# AWS account details |
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
# List all AWS availability zones | |
# | |
# Depends on: | |
# - `aws`: https://aws.amazon.com/cli/ (installed and configured with credentials) | |
# - `jq`: https://stedolan.github.io/jq/ | |
# | |
for REGION in $( | |
aws ec2 describe-regions | jq --raw-output '.Regions | map(.RegionName) | .[]' | sort | |
); do | |
aws ec2 describe-availability-zones --region "$REGION" | |
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
$ gsutil ls -R gs://kubernetes-release/release/v1.2.0 | sed 's|gs://kubernetes-release|https://storage.googleapis.com/kubernetes-release|; /^.*:$/d; /^$/d' | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-386.tar.gz | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-386.tar.gz.md5 | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-386.tar.gz.sha1 | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-amd64.tar.gz | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-amd64.tar.gz.md5 | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-darwin-amd64.tar.gz.sha1 | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-linux-386.tar.gz | |
https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes-client-linux-386.tar.gz.md5 | |
https://storage.googleapis.com/kub |
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/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
OlderNewer