This file contains hidden or 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 | |
exec 1> >(logger -s -t $(basename $0)) 2>&1 | |
echo "hello world" |
This file contains hidden or 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 | |
keytool \ | |
-importcert \ | |
-noprompt \ | |
-keystore cacerts \ | |
--storepass changeit \ | |
-alias newcert \ | |
-file /root/ca.pem |
This file contains hidden or 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 | |
# Author: Carl Loa Odin <[email protected]> | |
# https://gist.github.com/loa/435da12af9494a112daf | |
test_res=0 | |
function get_git_version() { | |
version=$(git describe) | |
if [ $? -eq 128 ]; then | |
# Return initial version incase no tags is found |
This file contains hidden or 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 | |
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' |
This file contains hidden or 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 | |
rotateCursor() { | |
s="-,\\,|,/" | |
for i in `seq 1 $1`; do | |
for i in ${s//,/ }; do | |
echo -n $i | |
sleep 1 | |
echo -ne '\b' | |
done |
This file contains hidden or 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 | |
# http://alestic.com/2010/10/ec2-ssh-keys | |
which aws > /dev/null 2>&1 || { | |
echo "ERROR: missing aws-cli" | |
echo "http://aws.amazon.com/cli/" | |
echo "$ brew install awscli" | |
exit 1 | |
} |
This file contains hidden or 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
git diff --ignore-space-at-eol -b -w --ignore-blank-lines |
This file contains hidden or 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
alias nosleep='pmset noidle' |
This file contains hidden or 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 | |
import base64 | |
import os | |
import urllib2 | |
username = os.environ['user'] | |
password = os.environ['password'] | |
This file contains hidden or 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
- job-template: | |
name: 'exitcode-{exitcode}-{testresult}' | |
builders: | |
- shell: | | |
#!/bin/bash -xe | |
if [ "{testresult}" = "passed" ]; then | |
STATUS="passed" | |
NUM_FAILURE="0" |