Skip to content

Instantly share code, notes, and snippets.

View elmer-garduno's full-sized avatar

Elmer Garduno elmer-garduno

View GitHub Profile
@elmer-garduno
elmer-garduno / jalt
Created November 23, 2013 14:02
Update java alternatives in OS X. Simple script to switch between java alternatives.
#!/bin/bash
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo rm -r CurrentJDK
if [ $1 = "6" ]; then
sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents CurrentJDK
fi
if [ $1 = "7" ]; then
@elmer-garduno
elmer-garduno / RMQReceiver.scala
Created September 6, 2013 03:01
RabbitMQ Actor with Receiver
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@elmer-garduno
elmer-garduno / stripgutenberg.pl
Created July 25, 2012 15:51 — forked from hippietrail/stripgutenberg.pl
Strip headers/footers from Project Gutenberg texts
#!/usr/bin/perl
# stripgutenberg.pl < in.txt > out.txt
#
# designed for piping
# Written by Andrew Dunbar (hippietrail), released into the public domain, Dec 2010
# Added some other patterns to the beginning and header states
use strict;