Skip to content

Instantly share code, notes, and snippets.

Aaron J. Zirbes aaronzirbes

Block or report user

Report or block aaronzirbes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aaronzirbes
aaronzirbes / jira
Created Apr 6, 2016
Jira Script to open JIRA
View jira
#!/bin/bash
JIRA_HOST="https://jira.atlassian.com"
ISSUE=""
DEFAULT_PROJECT=PCDR
if [ "$1" == "" ]; then
current_branch=`git rev-parse --abbrev-ref HEAD`
if [ $? == 0 ] && [[ "${current_branch}" =~ [A-Za-z]-[0-9] ]]; then
echo "Using git branch name as JIRA issue"
@aaronzirbes
aaronzirbes / ObservableQueue.groovy
Created Nov 4, 2015
A observable queue that you can push to for deferred processing
View ObservableQueue.groovy
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.TimeUnit
import rx.Observable
import rx.Subscriber
import rx.schedulers.Schedulers
class ObservableQueue<T> {
protected long pollTimeout = 1
@aaronzirbes
aaronzirbes / GroovyApiScript.groovy
Last active Oct 26, 2015
Starter script for Groovy scripts that call APIs and do stuff.
View GroovyApiScript.groovy
@Grapes([
@Grab(group='com.squareup.retrofit', module='retrofit', version='2.0.0-beta2'),
@Grab(group='com.squareup.retrofit', module='converter-jackson', version='2.0.0-beta2'),
@Grab(group='com.fasterxml.jackson.core', module='jackson-core', version='2.6.3'),
@Grab(group='com.fasterxml.jackson.core', module='jackson-databind', version='2.6.3'),
@Grab(group='org.slf4j', module='slf4j-simple', version='1.7.12')
])
import retrofit.Retrofit
import retrofit.Call
@aaronzirbes
aaronzirbes / logback.groovy
Created Sep 23, 2015
Logback Groovy Config
View logback.groovy
import static ch.qos.logback.classic.Level.DEBUG
import static ch.qos.logback.classic.Level.INFO
final String APP = 'my-app'
final String LOG_PATH = "/var/log/${APP}"
include 'org/springframework/boot/logging/logback/base.xml'
appender('STDOUT', ConsoleAppender) {
encoder(PatternLayoutEncoder) {
View gist:92a237a611d74da15530
// import java.io.ByteArrayOutputStream
import java.util.zip.GZIPOutputStream
import java.util.zip.GZIPInputStream
final String THE_RAVEN = '''Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
“’Tis some visitor,” I muttered, “tapping at my chamber door—
Only this and nothing more.”
@aaronzirbes
aaronzirbes / make-time-machine-work.sh
Last active Aug 25, 2016
Script to setup SMB share for time machine backup
View make-time-machine-work.sh
#!/bin/bash
###
### This is the script I use to setup time machine to work with my LinkSys attched NAS (USB 3.0 Hard Drive)
###
#### Configurable Parameters #########
SIZE=300g
NAME="Z.org Time Machine Backup"
@aaronzirbes
aaronzirbes / jumpssh
Last active Aug 29, 2015
SSHing throught a Jumphost
View jumpssh
#!/bin/bash
host=${1}
domain=service.consul
environment=staging
#environment=prod
credprefix=mycompany
# IP address of jumphost
@aaronzirbes
aaronzirbes / packer-kill-orphans.sh
Last active Nov 11, 2015
Delete orphaned artifacts left by packer.io
View packer-kill-orphans.sh
#!/bin/bash
set -e
# Keypairs
echo "Finding Key Pairs..."
KEY_PAIRS_JSON=`aws ec2 describe-key-pairs --filters 'Name=key-name,Values=packer*'`
KEY_PAIRS=`echo "${KEY_PAIRS_JSON}" | grep 'KeyName' |sed -e 's/.*"KeyName": "//' -e 's/",* *$//'`
# Security Groups
View unicode_color_chars.txt
231a ⌚ 231b ⌛ 23e9 ⏩ 23ea ⏪ 23eb ⏫ 23ec ⏬ 23f0 ⏰ 23f3 ⏳ 25fd ◽ 25fe ◾ 2614 ☔ 2615 ☕ 2648 ♈ 2649 ♉ 264a ♊ 264b ♋ |
264c ♌ 264d ♍ 264e ♎ 264f ♏ 2650 ♐ 2651 ♑ 2652 ♒ 2653 ♓ 267f ♿ 2693 ⚓ 26a1 ⚡ 26aa ⚪ 26ab ⚫ 26bd ⚽ 26c4 ⛄ 26c5 ⛅ |
26ce ⛎ 26d4 ⛔ 26ea ⛪ 26f2 ⛲ 26f3 ⛳ 26f5 ⛵ 26fa ⛺ 26fd ⛽ 2705 ✅ 270a ✊ 270b ✋ 2728 ✨ 274c ❌ 274e ❎ 2753 ❓ 2754 ❔ |
2755 ❕ 2757 ❗ 27bf ➿ 2b1b ⬛ 2b1c ⬜ 2b50 ⭐ 2b55 ⭕ |
View RemoteControl.groovy
package org.zirbes.grails.functional.remote
import grails.util.BuildSettingsHolder
import groovyx.remote.transport.http.HttpTransport
/**
* Adds null safe grails specific convenient no arg constructor.
* https://jira.grails.org/browse/GRAILS-10661
*/
class RemoteControl extends groovyx.remote.client.RemoteControl {
You can’t perform that action at this time.