Skip to content

Instantly share code, notes, and snippets.

View atreides322's full-sized avatar

Joe Atkins atreides322

View GitHub Profile
@atreides322
atreides322 / curlJava8.sh
Last active September 21, 2016 15:13
Download Java 8 RPM With Curl
curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jre-8u101-linux-i586.rpm -O
@atreides322
atreides322 / grailsSwitcher.zsh
Last active March 15, 2016 17:46
Automated Grails Switching
autoload -U add-zsh-hook
auto-sdk-switch() {
if [[ -f application.properties || -f gradle.properties ]]; then
sdk switch
fi
}
add-zsh-hook chpwd auto-sdk-switch
@atreides322
atreides322 / gamesToBring.groovy
Created August 31, 2013 01:57
Trying to determine what games I should consider bringing to a friend's game night.
#! /usr/bin/env groovy
@Grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version = '0.5.2')
import groovyx.net.http.HTTPBuilder
bgg = new HTTPBuilder('http://www.boardgamegeek.com/xmlapi2/collection')
dontEverBring = [3320, 2448, 1923, 5425, 1298, 181, 320, 2407, 5258, 3385, 11182, 1515]
mine = downloadGameList(bgg, 'atreides322').findAll { !dontEverBring.contains(it.id) }
@atreides322
atreides322 / gist:1571659
Created January 6, 2012 17:57
Configure http_proxy, prompting for password
# Based on http://blog.mypapit.net/2006/02/how-to-use-apt-get-behind-proxy-server-ubuntudebian.html#comment-2435
# Adapted for zsh
function proxy(){
echo -n "Password: "
read -s password
export http_proxy="http://username:[email protected]:8080"
echo -e "\nProxy environment variable set."
}