Skip to content

Instantly share code, notes, and snippets.

View tyrannasaurusbanks's full-sized avatar

Ioan tyrannasaurusbanks

  • Hotels.com
  • London
View GitHub Profile
alert 'hello world'
@tyrannasaurusbanks
tyrannasaurusbanks / doesMarkDownWork.md
Last active December 17, 2015 13:49
# Test to see if markdown works in descriptions ## is this a h2?

Purple-monkey

  1. Donkey
  2. Kong

Blue lizard

  1. rar?
  2. boo!
@tyrannasaurusbanks
tyrannasaurusbanks / gist:5729078
Created June 7, 2013 13:01
how to read/write jenkins system property on mac osx
defaults read /Library/Preferences/org.jenkins-ci
sudo defaults write /Library/Preferences/org.jenkins-ci <propertyName> '<value>'
@tyrannasaurusbanks
tyrannasaurusbanks / grep to find failing builds
Last active December 19, 2015 18:38
Find modules which didn't build
cat /home/ioan/Perforce/iowen_linux/iowen_linux/hcomemea/Tools/core-foundation-version-advisor/previouslyUpdated.txt | grep -G -x -B 1 --color "" | grep . | grep -v -- "--" > /home/ioan/brokenBuilds.txt
@tyrannasaurusbanks
tyrannasaurusbanks / find and execute
Created July 24, 2013 13:27
find and execute command on results
find modules -name 'file_name_to_look_for' -exec grep -sH 'string_or_regex_to_be_found' {} \;
@tyrannasaurusbanks
tyrannasaurusbanks / findBadDependencies.sh
Last active December 24, 2015 09:49
find all bad dependencies listed in a file
#!/bin/sh
echo " This should be run from the the modules base directory. It should:"
echo " - loop through each dependency listed in the supplied file"
echo " - then check to see if that dependency is used in any of the ivy.xml files"
echo " - if it finds a match, then it should print it out along with the path to the file it was in."
USAGE="findBadDependencies toBeFound.txt"
if ["$1" = ""]; then
echo "Where's the dependencies file dufus?"
echo $USAGE
@tyrannasaurusbanks
tyrannasaurusbanks / gist:9914787
Created April 1, 2014 14:07
Install .jar's locally
#!/bin/sh
# Designed to be run from a project root directory, the script will:
# - recursively traverse down the folder structure from the execution location
# - look for 'target' folders
# - look for jar's with a name matching a pattern like '*.jar'
# - install all found jar's into the local maven repo
#
# NOTE: if you need to install test jar's then you need to specify an option -Dpackaging=test-jar
@tyrannasaurusbanks
tyrannasaurusbanks / yml to json
Created January 22, 2015 10:25
Convert yaml to json
cat kubernetes.yml \
| ruby -ryaml -rjson -e 'print YAML.load(STDIN.read).to_json' \
| tee kubernetes.json
@tyrannasaurusbanks
tyrannasaurusbanks / gist:f1d5717e2116fbb27756
Created March 27, 2015 11:49
pipe host ip into /etc/hosts alias from inside container (running net=host)
echo $(netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}') dockerhost >> /etc/hosts
@tyrannasaurusbanks
tyrannasaurusbanks / findScripts.sh
Last active September 15, 2015 13:32
Grab all scripts from a file
cat log.log | gawk 'match($0, /[\s]*.*\.sh/, arr) { print arr[0]}' | sed $'s/ */\\\n/g' | gawk 'match($0, /.*\.sh$/, arr) {print arr[0]}' | sort | uniq -u > uniqueScripts.txt