Skip to content

Instantly share code, notes, and snippets.

@jdunmore
jdunmore / increment_semver.sh
Created February 24, 2016 12:02
Bash Script for incrementing a sementic version
#!/bin/bash
if [ $# -ne 1 ]; then
echo $0: usage: script current_version
exit 1
fi
v=$1
echo "${v%.*}.$((${v##*.}+1))"
#phpspec yml example for configuration with zf2
#This allows a spec directory inside each module (i.e. at module/Application/spec)
#Have to add a namespace per module
suites:
Application:
namespace: Application
src_path: 'module/Application/src'
spec_path: 'module/Application'
@jdunmore
jdunmore / checkAlarm.php
Last active August 29, 2015 14:05
Check an AWS alarm from the PHP SDK
<?php
include("vendor/autoload.php");
use Aws\Common\Aws;
// Create a service builder using a configuration file
$aws = Aws::factory('config.php');
// Get the client from the builder by namespace
#!/bin/bash
excludedprocesses=(somethingidontwant:something_instance-0 somethingelse)
for f in `supervisorctl status | awk '{print $1}' `; do
echo "found $f"
if [[ ${excludedprocesses[*]} =~ $f ]]
then
echo "Exluding $f as a restart candidate"