Skip to content

Instantly share code, notes, and snippets.

@wingrunr21
wingrunr21 / configure.log output
Created December 25, 2010 21:44
Output for rvm install rbx configure.log
[2010-12-25 16:43:48] Configuring Rubinius...
[2010-12-25 16:43:48] Configuring LLVM...
[2010-12-25 16:43:48] Checking for existing LLVM tree:
[2010-12-25 16:43:48] not found.
[2010-12-25 16:43:48] Checking for prebuilt LLVM package...
[2010-12-25 16:43:48] Downloading llvm-2.8-x86_64-apple-darwin10.5.0.tar.bz2...
[2010-12-25 16:43:59] : done!
[2010-12-25 16:43:59] Downloading llvm-2.8-x86_64-apple-darwin10.5.0.tar.bz2.md5...
[2010-12-25 16:43:59] : done!
[2010-12-25 16:43:59] MD5 checksum for prebuilt LLVM verified.
@wingrunr21
wingrunr21 / configure output from RVM
Created December 25, 2010 21:58
./configure --prefix=/Users/wingrunr21/.rvm/rubies/rbx-head --skip-system
~/.rvm/src/rbx-head > ./configure --prefix=/Users/wingrunr21/.rvm/rubies/rbx-head --skip-system
Configuring LLVM...
Checking for existing LLVM tree: ./configure:302: command not found: /Users/wingrunr21/.rvm/src/rbx-head/vm/external_libs/llvm/Release/bin/llvm-config --version
outdated (version )
Removing outdated tree...
Checking for prebuilt LLVM package...
Unpacking prebuilt LLVM: llvm-2.8-x86_64-apple-darwin10.5.0.tar.bz2: done!
Checking sizeof(long): 8 bytes
Checking platform endianness: little endian
wingrunr21@wings ~/Desktop/rubinius > ./configure
Configuring LLVM...
Checking for existing LLVM tree: found!
Checking sizeof(long): 8 bytes
Checking platform endianness: little endian
Checking tr1/hash definition: found
Checking for function 'backtrace': found!
Checking for function 'readline': found!
Checking curses library: curses
wingrunr21@wings ~/Desktop/rubinius > which ruby
/Users/wingrunr21/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
wingrunr21@wings ~/Desktop/rubinius > rvm system
wingrunr21@wings ~/Desktop/rubinius > which ruby
/usr/bin/ruby
wingrunr21@wings ~/Desktop/rubinius > which rake
/usr/bin/rake
wingrunr21@wings ~/Desktop/rubinius > /usr/bin/rake
(in /Users/wingrunr21/Desktop/rubinius)
@wingrunr21
wingrunr21 / new_module.rb
Created May 11, 2011 14:32
Module Method Decoration Example
module Foobar
class << self
alias_method :orig_foo, :foo
def Foobar.foo(options)
options = "Output: " + options.reverse
Foobar.orig_foo(options)
end
end
end
@wingrunr21
wingrunr21 / ceton-1.7.ebuild
Created November 3, 2011 17:22
Ceton 1.7 ebuild
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="2"
inherit eutils versionator linux-mod
DESCRIPTION="Ceton InfiniTV Linux Drivers"
HOMEPAGE="http://cetoncorp.com/infinitv_support/linux-drivers/"
SRC_URI="http://cetoncorp.com/downloads/ceton_infinitv_linux_driver_1_7.tar.gz"
@wingrunr21
wingrunr21 / backtrace.txt
Created September 27, 2012 17:13
Backtrace for factory_girl issue #440
undefined method `name' for "":String
@ vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/declaration/implicit.rb:11:in `=='
vendor/bundle/ruby/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_dirty.rb:20:in `field_changed?'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.17/lib/active_record/attribute_methods/dirty.rb:57:in `write_attribute'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.17/lib/active_record/attribute_methods/write.rb:14:in `product_id='
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:16:in `block (2 levels) in object'
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:15:in `each'
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:15:in `block in object'
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:14:in `tap'
vendor/bundle/ruby/1.9.1/gems/factor
@wingrunr21
wingrunr21 / postbox_gpu_fix.sh
Created November 5, 2012 22:42
Bash script to update the Postbox Info.plist file to support automatic GPU switching
#!/bin/bash
info=/Applications/Postbox.app/Contents/Info.plist
backup=$info.backup
if [[ $1 == "restore" ]]; then
cp $backup $info
exit
fi
@wingrunr21
wingrunr21 / airbrake.rb
Created November 26, 2012 21:11
Airbrake environment by hostname
Airbrake.configure do |config|
# ...
if Rails.env.staging?
config.environment_name = `hostname -f`.strip
end
# ...
end
@wingrunr21
wingrunr21 / postal_code_lookup.rb
Created January 4, 2013 23:55
A quick module for doing postal code lookups from the geonames.org JSON API.
require 'multi_json'
module PostalCodeLookup
GEONAMES_URL = 'http://api.geonames.org/postalCodeSearchJSON'
def self.find_postal_code_data(code)
info = nil
begin
client = HTTPClient.new