Skip to content

Instantly share code, notes, and snippets.

@atkolkma
atkolkma / gist:6545792
Last active December 22, 2015 23:19
Working on step 4 of Fizz Buzz here. But whenever I modify the output of the fizzbuzzer method with the as_text method I get an undefined error
class FizzBuzz
def as_text (input)
input.to_string
end
def fizzbuzzer (limit)
(1..limit).map do |n|
if n % 15 == 0
"fizzbuzz"
@atkolkma
atkolkma / gist:6580427
Last active December 23, 2015 04:29 — forked from anonymous/gist:6580417
class FizzBuzz
require 'json'
def initialize (input)
@max = input
end
def modulo_parse (n)
if n % 15 == 0
@atkolkma
atkolkma / gist:7516896
Last active December 28, 2015 14:48
rspec test for output of fizzbuzz()
require "~/development/tested/lib/fizzbuzz.rb"
describe FizzBuzz do
describe '#fizzbuzzer' do
it "accurately outputs for various integers" do
expect(fizzbuzzer(9)).to eql("Fizz")
end
end
end
@atkolkma
atkolkma / gist:8024287
Created December 18, 2013 15:31
Sample carfax report
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@atkolkma
atkolkma / gist:8024329
Created December 18, 2013 15:33
The div I'm trying to target
<div id="headerBodyType">
SEDAN 4 DR
</div>
@atkolkma
atkolkma / gist:8153017
Created December 27, 2013 21:41
Sublime Text console messages at startup
theme loaded
app ready
pre session restore time: 0.57652
using gpu buffer for window
Loading dictionary Packages/Language - English/en_US.dic
using gamma: 2 (err: 6.9282)
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
startup cache, total files: 119 cache hits: 119
@atkolkma
atkolkma / Capfile
Created March 14, 2014 12:58
Capistrano deployment
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rails'
# Includes tasks from other gems included in your Gemfile
#
@atkolkma
atkolkma / Output from cap production deploy
Created March 14, 2014 16:27
Minitest 4.7.5 installation error
cap production deploy
INFO [8da38c5c] Running /usr/bin/env mkdir -p /tmp/parts-inventory/ on 107.170.25.140
DEBUG [8da38c5c] Command: /usr/bin/env mkdir -p /tmp/parts-inventory/
INFO [8da38c5c] Finished in 0.933 seconds with exit status 0 (successful).
DEBUG Uploading /usr/local/rvm/gems/ruby-2.1.0/gems/rvm1-capistrano3-1.2.2/script/rvm-auto.sh 0.0%
INFO Uploading /usr/local/rvm/gems/ruby-2.1.0/gems/rvm1-capistrano3-1.2.2/script/rvm-auto.sh 100.0%
INFO [813bdfae] Running /usr/bin/env chmod +x /tmp/parts-inventory/rvm-auto.sh on 107.170.25.140
DEBUG [813bdfae] Command: /usr/bin/env chmod +x /tmp/parts-inventory/rvm-auto.sh
INFO [813bdfae] Finished in 0.083 seconds with exit status 0 (successful).
INFO [a071c752] Running /usr/bin/env mkdir -p /tmp/parts-inventory/ on 107.170.25.140
@atkolkma
atkolkma / gist:9552264
Created March 14, 2014 17:12
minitest location
root@cmon:/usr/local/rvm/gems/ruby-2.1.0@global/gems# ls
bundler-1.5.0 bundler-unload-1.0.2 executable-hooks-1.2.6 gem-wrappers-1.2.1 gem-wrappers-1.2.4 rake-10.1.0 rdoc-4.1.0 rubygems-bundler-1.4.2 rvm-1.11.3.8 test-unit-2.1.0.0
But minitest is stored elsewhere:
root@cmon:/usr/local/rvm/gems/ruby-2.1.0@parts-inventory/gems# ls
minitest-4.7.5
namespace :deploy do
desc "Hot-reload God configuration for the Resque worker"
task :reload_god_config do
sudo "god stop resque"
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}"
sudo "god start resque"
end
end
# append to the bottom: