Skip to content

Instantly share code, notes, and snippets.

View tobytripp's full-sized avatar

Toby Tripp tobytripp

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tobytripp on github.
  • I am tobytripp (https://keybase.io/tobytripp) on keybase.
  • I have a public key ASD-LM70xUTqUUJ8qktjNZAhPLzl4fSZo2Sk5PHoFRPehwo

To claim this, I am signing this object:

FROM ruby:2.2.2
RUN adduser app --home /home/app --shell /bin/bash --disabled-password --gecos ""
ADD Gemfile /home/app/
ADD Gemfile.lock /home/app/
RUN mkdir -p /var/bundle && chown -R app:app /var/bundle /usr/local/bundle
USER app
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_VERSION = 2
Vagrant.configure( VAGRANTFILE_VERSION ) do |config|
config.vm.define "ruby" do |ruby|
ruby.vm.provider "docker" do |docker|
docker.build_dir = "."
docker.name = "basic-rails"
@tobytripp
tobytripp / Vagrantfile
Created March 21, 2015 16:12
Quick Vagrant file for creating a clojure-ready virtual machine.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 4343, host: 4343
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.17
- RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-darwin11.3.0]
- INSTALLATION DIRECTORY: /Users/toby/.rvm/gems/ruby-1.9.3-p125@gset
- RUBY EXECUTABLE: /Users/toby/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
- EXECUTABLE DIRECTORY: /Users/toby/.rvm/gems/ruby-1.9.3-p125@gset/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
rvm_bin_path=/Users/toby/.rvm/bin
GEM_HOME=/Users/toby/.rvm/gems/ruby-1.9.3-p125@gset
IRBRC=/Users/toby/.rvm/rubies/ruby-1.9.3-p125/.irbrc
OLDPWD=/Users/toby/.rvm/gems/ruby-1.9.3-p125@git-precommit
MY_RUBY_HOME=/Users/toby/.rvm/rubies/ruby-1.9.3-p125
rvm_tar=tar
rvm_path=/Users/toby/.rvm
rvm_uname=Darwin
rvm_prefix=/Users/toby
PATH=/Users/toby/.rvm/gems/ruby-1.9.3-p125@gset/bin:/Users/toby/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/toby/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/toby/.rvm/bin:/usr/local/share/npm/bin:/Users/toby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/ruby/bin
ruby-1.9.3-p125@gset:
system:
uname: "Darwin Tobys-Air.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)"
zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)"
rvm:
version: "rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]"
updated: "20 minutes 46 seconds ago"
@tobytripp
tobytripp / unicode_update.rb
Created January 12, 2012 15:08
Ruby OCI, you make me sad…
#!/usr/bin/env ruby
ENV['NLS_LANG'] = 'AMERICAN_AMERICA.UTF8'
require 'oci8'
def exec( connection, sql )
puts "exec: #{sql}"
connection.exec( sql ) { |r| puts r.join(', ') }
end
def main
@tobytripp
tobytripp / audio_test.rb
Created April 18, 2011 13:28
Play a given audio file in Ruby
#!/usr/bin/env ruby
require 'rubygame'
include Rubygame
# Stuff that I had to do to get this running:
#
# brew install sdl sdl_mixer
# gem install rubygame rsdl
# Let's start by trying to play a random mp3 passed as an argument
@tobytripp
tobytripp / PeepOpen sample
Created August 25, 2010 19:29
Sample of a running PeepOpen process that is stuck reloading the project directory
Sampling process 67060 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling PeepOpen (pid 67060) every 1 millisecond
Call graph:
2652 Thread_1397568 DispatchQueue_1: com.apple.main-thread (serial)
2652 start
2652 macruby_main
2652 ruby_run_node
2652 rb_vm_run
2652 0x1014009f4