Skip to content

Instantly share code, notes, and snippets.

View mustmodify's full-sized avatar

Johnathon "jw" Wright mustmodify

View GitHub Profile
def gap_weight_for( age )
difference = (value_of(age) - patient_age).abs
puts difference.inspect
x = difference * 0.1
puts x.to_s
x ** 1.07
end
@mustmodify
mustmodify / navigation_helper.rb
Last active May 1, 2019 19:25
RubyHotline: helpers in helpers
module NavigationHelper
def conditional_render( yesno )
yield if yesno && block_given?
end
Invalid handle usage detected!
handle: 0x4a491b0
checksum: 0x0
references: 0
type: 41
object: 0x4a490d0
Abort!
script/imports/import_physicians.rb(_ZN8rubinius5abortEv+0x29) [0x5a03e9]
script/imports/import_physicians.rb() [0x6e74de]
script/imports/import_physicians.rb(rb_type+0x74) [0x6f4934]
An exception occurred running bin/rails:
Missing or uninitialized constant: OpenSSL::Digest::OPENSSL_VERSION_NUMBER (NameError)
Backtrace:
Module(Class)#const_missing at kernel/common/module.rb:652
{ } in Object(Class)#__script__ at /home/production
/api.medycation.com/shared
/bundle/rbx/2.1/gems
POST /proxy/identity/v2.0/users HTTP/1.1
Host: mycloud.rackspace.com
Connection: keep-alive
Content-Length: 281
X-NewRelic-ID: UwEHWVBADwcJUVBQ
Origin: https://mycloud.rackspace.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Content-Type: application/json; charset=UTF-8
Accept: */*
Referer: https://mycloud.rackspace.com/cloud/759191/account
@mustmodify
mustmodify / def.profile-table
Last active August 29, 2015 14:03
Rails loads slowly in production
index % time self children called name
----------------------------------------------------------
[1] 100.0 0.00 9.33 1 Object::__script__<13> {} [1]
0.00 9.33 1 Rails::Railtie::Configurable::ClassMethods#initialize! [2]
-------------------------------------------------------
0.00 9.33 1 Object::__script__<13> {} [1]
[2] 100.0 0.00 9.33 1 Rails::Railtie::Configurable::ClassMethods#initialize! [2]
0.00 9.33 1 Rails::Application#initialize! [3]
-------------------------------------------------------
0.00 9.33 1 Rails::Railtie::Configurable::ClassMethods#initialize! [2]
cat /home/production/api.medycation.com/shared/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rubysl-yaml-2.0.4/gem_make.out
/usr/local/bin/ruby extconf.rb
checking for st.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling emitter.c
compiling gram.c
ubuntu@ip-172-31-47-225:~/ruby-install-0.4.3$ ruby-install
Known ruby versions:
ruby:
1: 1.9.3-p545
1.9: 1.9.3-p545
1.9.3: 1.9.3-p545
2.0: 2.0.0-p451
2.0.0: 2.0.0-p451
2: 2.1.2
2.1: 2.1.2
source 'https://rubygems.org'
# Rails, Server, DB
gem 'rails', '4.0.2'
gem 'mysql2'
gem 'puma'
# tools
gem 'bcrypt-ruby' # required by has_secure_password
gem 'better_errors', group: [:development]
if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
fi