Skip to content

Instantly share code, notes, and snippets.

View willian's full-sized avatar

Willian Fernandes willian

View GitHub Profile
require "socket"
require "digest/md5"
require "timeout"
class GNTP
attr_accessor :application_name
attr_accessor :host
attr_accessor :port
attr_accessor :password
@fnando
fnando / ruby.sh
Created June 29, 2012 03:38
Install Ruby
#!/usr/bin/env bash
INSTALL_DIR="${INSTALL_DIR:-/opt/local}"
VERSION=$2
APP_NAME="ruby"
URL="http://ftp.ruby-lang.org/pub/ruby/ruby-$VERSION.tar.bz2"
PREFIX="$INSTALL_DIR/$APP_NAME/$VERSION"
CURRENT="$INSTALL_DIR/$APP_NAME/current"
TGZ="$INSTALL_DIR/src/$(basename $URL)"
COMMAND=$1