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
####################################### | |
# SCRIPT 1 - PREVIEW BRANCH DELETIONS # | |
####################################### | |
# will print the names of the branches that have been merged into develop and master in green and branches that are only merged into develop but not master in red. | |
BRANCHES_IN_MASTER=`git branch -r --merged origin/master | grep -v -E '(\*|master$|develop$)' | cut -f2- -d '/' | tr '\n' ';'` && export BRANCHES_IN_MASTER && git branch -r --merged origin/develop | grep -v -E '(\*|master$|develop$)' | cut -f2- -d '/' | xargs -L1 bash -c 'if [ $(grep -o "$0" <<< "$BRANCHES_IN_MASTER" | wc -l) -gt 0 ] ; then printf "\e[0;32m $0 \e[0m\n"; else printf "\e[0;31m $0 is merged into DEVELOP but not MASTER \e[0m\n"; fi'; | |
################################################################################################################################# | |
# SCRIPT 2 - DANGER -- RUN AT YOUR OWN RISK -- The following script will DELETE the branches listed in the above preview script # | |
########################### |
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 | |
URL="http://a0.awsstatic.com/pricing/1/ec2/ri-v2/linux-unix-shared.min.js" | |
(echo 'function callback(data) { console.log(JSON.stringify(data)); }'; curl -s "$URL") |\ | |
node |\ | |
jq -r '.config.regions[] | | |
select(.region == "us-east-1") | | |
.instanceTypes[] | | |
[ |
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 | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
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 ruby | |
# | |
# this is a special meta-check. It runs ping checks against all hosts in | |
# the /endpoints API and sends individual results directly to sensu-client via | |
# the udp/3030 client socket. this is different from the normal sensu check model | |
# where individual scripts run and their exit status and output is used to create | |
# a single event. | |
# | |
# the reason for this check is to be able to dynamically ping a list of hosts | |
# without the race conditions and timing issues involved with creating individual |
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 | |
# | |
# /etc/init.d/tomcat7 -- Startup/shutdown script for Tomcat 7 | |
# | |
# Written by Mustafa Ashurex <[email protected]>. | |
# | |
# | |
### BEGIN INIT INFO | |
# Provides: tomcat7 | |
# Required-Start: $Local_fs $remote_fs $network $sysLog |
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 | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
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 python | |
""" | |
This module will bootstrap a machine using chef. The purpose of this | |
script is actually to work with AWS Auto Scaling Groups. The user data | |
for the Launch Configuration is set to download this script and then | |
run it. This is also stores the results in a private gist and sends | |
a message to logstash with the results. | |
""" |
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
export [email protected] | |
export DEBFULLNAME="Jürgen E. Fischer" | |
export PPA=${1:-qgis-unstable-ubuntugis-jef} | |
export T=$(mktemp) | |
cp debian/changelog $T | |
trap "cp $T debian/changelog && rm -f $T" EXIT |
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
require 'rspec/expectations' | |
module ExitCodeMatchers | |
extend RSpec::Matchers::DSL | |
matcher :terminate do | |
actual = nil | |
match do |block| | |
begin |
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
Copyright (C) 2011 by Colin MacKenzie IV | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
NewerOlder