This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "fog" | |
require "pry" | |
class RaxUserFileSet | |
def initialize(limit = nil) | |
conn = Fog::Storage.new({ | |
:provider => "Rackspace", | |
:rackspace_username => RAX_UN, | |
:rackspace_api_key => RAX_API_KEY, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 # -*- mode: ruby -*- | |
2 # vi: set ft=ruby : | |
3 | |
4 require File.expand_path("../config.rb", __FILE__) | |
5 | |
6 $username = ENV["USER"] | |
7 | |
8 Vagrant.configure("2") do |config| | |
9 config.vm.box = "teamsnap/embryo" | |
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Replaced first line with: $(document).on("page:update", function(){ */ | |
$(document).ready(function(){ | |
$('.filterable .btn-filter').click(function(){ | |
var $panel = $(this).parents('.filterable'), | |
$filters = $panel.find('.filters input'), | |
$tbody = $panel.find('.table tbody'); | |
if ($filters.prop('disabled') == true) { | |
$filters.prop('disabled', false); | |
$filters.first().focus(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ERROR OUTPUT IN TERMINAL | |
#Started POST "/tickets/525204671" for 127.0.0.1 at 2014-05-03 23:17:01 -0600 | |
#Processing by WelcomeController#update as HTML | |
# Parameters: {"price"=>"66.77", "event"=>"4426617", "id"=>"525204671"} | |
#<HTTParty::Response:0x7fd0cb6d1520 parsed_response={"error"=>{"code"=>"java.io.EOFException", "description"=>"No content to map to Object due to end of input", "requestId"=>"_76a2d494-5936-431d-9889-a71ec03b3fe8"}}, @response=#<Net::HTTPInternalServerError 500 Internal Server Error readbody=true>, @headers={"content-type"=>["application/json"], "com-stubhub-dye"=>["_76a2d494-5936-431d-9889-a71ec03b3fe8"], "com-stubhub-dye-path"=>["_76a2d494-5936-431d-9889-a71ec03b3fe8"], "server"=>["Apache"], "expires"=>["Sun, 04 May 2014 05:17:01 GMT"], "cache-control"=>["max-age=0, no-cache, no-store"], "pragma"=>["no-cache"], "date"=>["Sun, 04 May 2014 05:17:01 GMT"], "connection"=>["close"]}> | |
#Redirected to http://localhost:3000/events/4426617 | |
#Completed 302 Found in 231ms (ActiveRecord: 0.0ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# About 30% through first refactoring | |
class Dogs | |
POOR = (0..5).to_a.sample | |
AVERAGE = (6..10).to_a.sample | |
EXCELLENT = (11..15).to_a.sample | |
def initialize | |
joe = { | |
:name => {:first => "Joe", :last => "Smith"}, |