Skip to content

Instantly share code, notes, and snippets.

View IanVaughan's full-sized avatar
👯‍♀️
OMG

Ian Vaughan IanVaughan

👯‍♀️
OMG
View GitHub Profile
@IanVaughan
IanVaughan / api.rb
Created May 15, 2012 20:44
Api Idea
require 'httparty'
require 'yaml'
require 'app_conf'
module Tickspot
class ApiAccess
include HTTParty
def initialize(site, u, p)
@auth = {email: u, password: p}
@IanVaughan
IanVaughan / history
Created May 19, 2012 12:17
problems with mysql and sequel gem working in ruby
$ sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql 1 ↵ ✹ ✭master ‹1.9.3-p125›
Successfully installed mysql-2.8.1
$ sudo gem uninstall mysql ✹ ✭master ‹1.9.3-p125›
Successfully uninstalled mysql-2.8.1
$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config ✹ ✭master ‹1.9.3-p125›
Fetching: mysql-2.8.1.gem (100%)
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
@IanVaughan
IanVaughan / home info
Created May 19, 2012 12:19
Skype connection details
Call Info:
Identity: rtsman
Duration: 00:27
Start Time: 22:35
Type: 1
Status: 7
Call Debug Info for rtsman:
ObjID: 29037
Codec: SILK_V3
$ ruby -v
ruby 1.8.7 (2011-12-28 MBARI 8/0x6770 on patchlevel 357) [i686-darwin11.3.0], MBARI 0x6770, Ruby Enterprise Edition 2012.01
$ rails -h
/Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57:in `require'
from /Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57
from /Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31:in `require'
from /Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31
from /Users/ivaughan/.rbenv/versions/ree-1.8.7-2012.01/lib/ruby/gems/1.8/gems/rails-2.3.8/bin/rails:15:in `require'
@IanVaughan
IanVaughan / Gemfile
Created May 25, 2012 13:53
Trying to get Resque Delayed Jobs to work and show in resque-web view
gem 'resque', :require => "resque/server"
gem 'sinatra', '0.9.2'
gem 'resque-scheduler', :require => 'resque_scheduler'
@IanVaughan
IanVaughan / get_github_repos.rb
Created May 29, 2012 14:03
Quick hack to get a list of all our repos
# curl -u "user:password" https://api.github.com/orgs/:org/repos
require 'httparty'
require 'pp'
class GitHub
include HTTParty
base_uri 'https://api.github.com'
def initialize(u, p)
@IanVaughan
IanVaughan / README.md
Created June 6, 2012 10:46
rbenv gemset workflow
$ echo global > ~/.rbenv-gemsets
$ gem install bundler
$ cd my-project
$ echo "my-project-gemset global" > .rbenv-gemsets
$ bundle install

$ rbenv gemset create 1.9.3-p125 my-project-gemset
@IanVaughan
IanVaughan / README.md
Created June 7, 2012 09:57
Push branch from one remote into another

Push branch from one remote into another

Add remote2 as a remote

$ git remote -v
remote2 git@github.com:repo2.git (fetch)
remote2 git@github.com:repo2.git (push)
origin  git@github.com:repo.git (fetch)
origin  git@github.com:repo.git (push)
@IanVaughan
IanVaughan / README.md
Created June 8, 2012 07:38
Trying to understand rbenv gemsets

rbenv gemsets

Versions

$ rbenv
rbenv 0.3.0

$ rbenv gemset
version 0.3.0

rbenv-gemset [command] [options]

@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}