Skip to content

Instantly share code, notes, and snippets.

View fetchak's full-sized avatar

fetchak

  • Boulder, CO
View GitHub Profile
@fetchak
fetchak / unicorn
Last active August 29, 2015 14:13 — forked from hSATAC/unicorn
#!/bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the unicorns at boot
# Description: Enable at boot time.
### END INIT INFO
require 'spec_helper'
shared_examples "extended_definition" do |sense|
it "must contain original definition" do
expect(sense.extended_definition).to include(sense.definition)
end
it "must contain both sample texts" do
expect(
sense.samples.pluck(:sample).collect { |t| sense.extended_definition.include? t }.inject(:&)
$ be rails s
DEPRECATION WARNING: Support for Rails < 3.2.13 will be dropped from Formtastic 3.0. (called from <top (required)> at /home/www/lockstate/LockStateConnect/config/application.rb:14)
=> Booting WEBrick
=> Rails 3.0.10 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
WARNING: Sinatra 1.2.x has reached its EOL. Please upgrade.
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
Exiting
/home/sun/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/factory_girl-4.5.0/lib/factory_girl/definition_proxy.rb:42:in `add_attribute': wrong number of arguments (3 for 2) (ArgumentError)
@fetchak
fetchak / 'next' broken in byebug
Last active August 29, 2015 14:16
inconsistent 'next' behavior in byebug and byebug-pry
[68, 77] in /home/www/Company/app/controllers/application_controller.rb
68: end
69: end
70:
71: def calculate_bill
72: debugger
=> 73: total_devices = current_user.account.device_count
74: if !current_user.account.plan_tier.nil?
75: if current_user.account.plan_tier_id != 0
76: if !current_user.account.plan_tier.is_free?
@fetchak
fetchak / 'continue' in byebug
Created March 5, 2015 19:53
'continue' in byebug vs byebug-pry
(byebug) help continue
c[ont[inue]][ <n>]
Run until program ends, hits a breakpoint or reaches line <n>.
(byebug)
├─────────────────────────┼─────────┤
│ 2016-10-08 02:24:50 UTC ╎ 5.01005 │
│ 2016-10-07 19:23:59 UTC ╎ 5.02221 │
│ 2016-10-07 09:02:14 UTC ╎ 5.04653 │
│ 2016-10-07 07:01:58 UTC ╎ 0.0 │
│ 2016-10-06 05:58:19 UTC ╎ 5.08301 │
│ 2016-10-06 04:55:57 UTC ╎ 5.07085 │
│ 2016-10-06 03:33:05 UTC ╎ 5.08301 │
│ 2016-10-06 02:44:14 UTC ╎ 5.08301 │
│ 2016-10-01 21:16:31 UTC ╎ 5.25326 │
test