Skip to content

Instantly share code, notes, and snippets.

View charliemoseley's full-sized avatar

Charlie Moseley charliemoseley

View GitHub Profile
@charliemoseley
charliemoseley / LionHomebrewGemsClean.rb
Created July 21, 2011 17:10
Install Homebrew and RubyGems on OSX Lion Clean
# Download XCode from App Store and Install
# (probably not needed)
# RVM installs your gems bundled in together with the ruby version so....
# mkdir /usr/local/rubygems
# gem enivornment
# Move all gem files from the gem enivornment into /usr/local/rubygems
# Update rubygems to make sure it still works.
# (end probably not needed)
# Install homebrew
# brew install git
@charliemoseley
charliemoseley / gdata_request.rb
Created July 30, 2011 02:56
Probably a completely wrong gem
require "gdata_request/version"
module GdataRequest
# A simple class that makes a oauth request using the oauth gem
class OauthRequest
def initialize(oauth_token, oauth_secret, params = {
:application_id => 'anonymous',
:application_secret => 'anonymous',
:site => 'https://www.google.com'
})
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "gdata_request/version"
Gem::Specification.new do |s|
s.name = "gdata_request"
s.version = GdataRequest::VERSION
s.authors = ["Charlie Moseley"]
s.email = ["[email protected]"]
s.homepage = ""
File to import not found or unreadable: compass/css3.
Load path: Sass::Rails::Importer(/Users/misu/Dropbox/Code/hark/app/assets/stylesheets/screen.css.erb.scss)
(in /Users/misu/Dropbox/Code/hark/app/assets/stylesheets/screen.css.erb.scss)
@charliemoseley
charliemoseley / Omniauth Twitter Hash
Created February 16, 2012 09:48
Twitter Authentication hash
--
provider: twitter
uid: '15280529'
info:
  nickname: penguinbusiness
  name: Charlie Moseley
  location: Bellevue, WA
  image: http://a1.twimg.com/profile_images/281933747/kitamura_ava_normal.gif
  description: Developer, Otaku, Geek.
  urls:
--- !map:OmniAuth::AuthHash
provider: facebook
uid: "100002213819061"
info: !map:OmniAuth::AuthHash::InfoHash
nickname: emotejiji.robo
email: [email protected]
name: Emotejiji Robo
first_name: Emotejiji
last_name: Robo
image: http://graph.facebook.com/100002213819061/picture?type=square
sylph:hark-server-automation misu$ vagrant up ci
[ci] VM already created. Booting if it's not already running...
sylph:hark-server-automation misu$ vagrant up ci
[ci] VM already created. Booting if it's not already running...
[ci] Clearing any previously set forwarded ports...
[ci] Forwarding ports...
[ci] -- 22 => 2222 (adapter 1)
[ci] Creating shared folders metadata...
[ci] Clearing any previously set network interfaces...
[ci] Preparing network interfaces based on configuration...
Vagrant::Config.run do |config|
###########################################################################
# Multiple VMs config
#
# boot all vms:
# vagrant up
#
# boot specific vm:
puts "Convert Fahrenheit Temp to Celsius \nPlease enter a temp in Fahrenheit: "
response = gets.chomp
unless response.include? 'merican'
puts ((response.to_i - 32) * 5) / 9
else
puts "Oh, Oh I am terribly sorry \nPlease enter a temp in Celsius:"
end
@charliemoseley
charliemoseley / gist:2267539
Created March 31, 2012 18:57
Starting point
require 'digest/sha1'
class EmoteList < Array
attr_accessor :type, :sort, :tags, :user
attr_reader :randomized
def assign_properties(properties = {})
@type = properties[:type]
@sort = properties[:sort]
@tags = properties[:tags]