Skip to content

Instantly share code, notes, and snippets.

View treeder's full-sized avatar
🥌

Travis Reeder treeder

🥌
View GitHub Profile
@treeder
treeder / goinstall.sh
Created September 4, 2013 22:19
Script to install latest Go version.
wget http://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz
tar -zxvf go1.1.2.linux-amd64.tar.gz
sed -i '$ a\export GOROOT=$HOME/go' .profile
sed -i '$ a\export PATH=$PATH:$GOROOT/bin' .profile
. .profile
go version
@treeder
treeder / rubyinstall.sh
Last active December 22, 2015 18:09
Install latest Ruby on Ubuntu, replacing the preinstalled ruby1.8.
# This script builds Ruby from sources
echo "Building Ruby..."
# remove ruby 1.8 crap
$SUDO apt-get -yf remove ruby libruby1.8 ruby1.8 ruby1.8-dev rubygems1.8
$SUDO apt-get -yf autoremove
sudo apt-get -yf install gcc libzlib-ruby libssl-dev libxslt-dev libxml2-dev libmemcached-dev libsasl2-dev libmemcached-dbg libpq-dev libcurl4-gnutls-dev libyaml-dev make
# the readline packages are required for readline support in ruby and some things like the heroku gem require it
{
"code":500,
"msg":"Internal Server Error",
"source_msg_id":"5924620498196814694",
"subscribers":[{"url":"http://rest-test.iron.io/code/503"}]
}
echo "Starting $1 glocks..."
num=$(($1-1))
startport=45625
for i in `seq 0 $num`
do
echo "Welcome $i times"
port=$((startport + i))
read -p "What is your full name for git? " git_name
read -p "What is your email for git? " git_email
git config --global user.name $git_name
git config --global user.email $git_email
# .netrc file for github, Go tool uses this
# Could try to change to: https://coderwall.com/p/jtujgw , but json parsing might be hard part
read -p "What is your github username? " github_username
read -p "What is your github password? " github_password
echo "machine github.com login $github_username password $github_password" > $HOME/.netrc
source 'https://rubygems.org'
gem 'iron_mq', :git => 'https://github.com/iron-io/iron_mq_ruby.git', :branch => 'v3'
gem 'quicky'
gem 'go'
gem 'uber_config'
@treeder
treeder / README.md
Last active April 27, 2018 20:34
Serving static site on app engine with golang

Put all your static files in /static directory. If you put index.html into /static, it will be served up as welcome file.

@treeder
treeder / test.rb
Created November 10, 2014 18:22
Gist 1
def func(yo)
end
@treeder
treeder / hellobot.rb
Last active August 29, 2015 14:17
Slack hellobot
require_relative 'bundle/bundler/setup'
require 'iron_worker'
require 'slack_webhooks'
sh = SlackWebhooks::Hook.new('hellobot', IronWorker.payload, IronWorker.config['webhook_url'])
text = "Hello #{sh.user_name}!"
sh.send(text)
@treeder
treeder / Gemfile
Last active August 29, 2015 14:17
Slack hellobot Gemfile
source "http://rubygems.org"
gem 'slack_webhooks'
gem 'iron_worker'