Skip to content

Instantly share code, notes, and snippets.

View garettarrowood's full-sized avatar
💭
working...

Garett Arrowood garettarrowood

💭
working...
View GitHub Profile
@garettarrowood
garettarrowood / benchmark.rb
Created November 26, 2017 01:00
Hash#merge! vs hash assignment Benchmarks
hash = {a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8, i:9, j:10}
Benchmark.measure { 10_000_000.times { hash.merge!(k:11) } }
=> @real=5.950756500009447, @utime=5.62, @total=5.94
Benchmark.measure { 10_000_000.times { hash[:k] = 11 } }
=> @real=0.6477032300026622, @utime=0.6499999999999995, @total=0.6499999999999995
@garettarrowood
garettarrowood / Bryan Reed
Last active April 19, 2017 16:35
Ninja testing list or controller dep warning PR
1. Employee referral page accurately lists all territories.
2. /cellphone_carriers still list all carriers
3. Dates and times are accurate on /user_requests/calendar page
4. Email templates listed correctly at /email_templates (just listed, I can't vouch for anything else on this page)
5. Popup schedules on /event_profiles/calendar work/load correctly
6. /finance_projects works right. It loads all the tabs, the tabs work, the data within each tab is correct. Clicking on a project loads the right show page.
7. Searching for homes on /homes works correctly.
8. Can click on a home. View it, and edit it.
9. Data is correct when viewing one inside_sales_campgain.
10. /inspections page's date functionality looks correct.
@garettarrowood
garettarrowood / output
Created January 3, 2017 18:02
Output of deploy to devtb4 containing many gem updates.
garettarrowood: ~/Power/nitro-web (ruby-2.3.3) rails4/ruby_v_and_bundle_update
[Tue Jan 03 12:26:12]$ cap devtb4 deploy
[Deprecation Notice] `set :scm, :git` is deprecated.
To ensure your project is compatible with future versions of Capistrano,
remove the :scm setting and instead add these lines to your Capfile:
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
INFO [2017-01-03 12:27:08 -0500] [0d99d9d1] Running /usr/bin/env mkdir -p /tmp as dimadmin@devtb4-nitro-cron.mydatainmotion.com
[Mon Jan 02 14:19:41]$ spring rspec spec/lib/nitro/wells_fargo/mapping_spec.rb
Running via Spring preloader in process 15850
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
1) Nitro::WellsFargo::Mapping::map_from sanitization rules home phone normalizes home phone number
Failure/Error: expect(main_applicant.home_phone).to eq "2151231234"
expected: "2151231234"
<!DOCTYPE html>
<html lang="en" ng-app="confusionApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head
content must come *after* these tags -->
<title>Ristorante Con Fusion: Menu</title>
<!-- Bootstrap -->
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (onInput, onSubmit)
import String exposing (..)
import Char exposing (..)
main =
Html.beginnerProgram
{ model = model
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (onInput, onSubmit)
import String exposing (..)
import Char exposing (..)
main =
Html.beginnerProgram
{ model = model
INFO [b9e3af64] Running bundle exec rails runner "AssetVersionChannel.publish_asset_version; ConnectAssetVersionChannel.publish_asset_version" as dimadmin@demo11-nitro-webserver.mydatainmotion.com
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as dimadmin@demo11-nitro-webserver.mydatainmotion.com: rails exit status: 1
rails stdout: Nothing written
rails stderr: /data/apps/ror/pws/shared/bundle/ruby/2.2.0/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query': Mysql2::Error: Table 'nitro_demo11.product_configs' doesn't exist: SHOW FULL FIELDS FROM `product_configs` (ActiveRecord::StatementInvalid)
from /data/apps/ror/pws/shared/bundle/ruby/2.2.0/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
from /data/apps/ror/pws/shared/bundle/ruby/2.2.0/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract_adapter.rb:280:
INFO [99428af9] Running bundle exec rake dev:load_recent as dimadmin@demo13-nitro-webserver.mydatainmotion.com
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as dimadmin@demo13-nitro-webserver.mydatainmotion.com: rake exit status: 1
rake stdout: Fetching MySQL dump...
getting file dev_env_dump.sql.gz
Fetching LDAP dump...
getting file dev_env_dump.ldif.gz
Recreating environment database...
Loading MySQL data; this may take a while...