Skip to content

Instantly share code, notes, and snippets.

View jrafanie's full-sized avatar

Joe Rafaniello jrafanie

  • New Jersey
View GitHub Profile
@jrafanie
jrafanie / AAA_output.log
Last active March 24, 2017 17:30
bundler 1.14.x issue resolving correct sys-proctable platform
01:28:55 ~/Code/new_project (2.4.1) + ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]
01:28:58 ~/Code/new_project (2.4.1) + bundle --version
Bundler version 1.14.6
01:29:00 ~/Code/new_project (2.4.1) + gem list sys-proctable
*** LOCAL GEMS ***
# ~/.rubies/ruby-compact/lib/ruby/gems/2.5.0/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb
def fork(nakayoshi: true, cow_friendly: true, &b)
if nakayoshi && cow_friendly
h = {}
4.times{ # maximum 4 times
GC.stat(h)
live_slots = h[:heap_live_slots] || h[:heap_live_slot]
old_objects = h[:old_objects] || h[:old_object]
remwb_unprotects = h[:remembered_wb_unprotected_objects] || h[:remembered_shady_object]
young_objects = live_slots - old_objects - remwb_unprotects
@jrafanie
jrafanie / boot_allocations.rb
Last active November 30, 2016 17:37
Rails boot allocations
def iter(n)
if n > 0
1.times{
iter(n-1)
}
else
# null code
end
end
@jrafanie
jrafanie / profile_amazon_refresh_retained_allocations.diff
Created November 17, 2016 16:29
Trace allocations in amazon provider refresh specs
From 19f131f47fc27939374253a936e10a9d7cbe3a3b Mon Sep 17 00:00:00 2001
From: Joe Rafaniello <[email protected]>
Date: Wed, 16 Nov 2016 14:09:45 -0500
Subject: [PATCH] WIP
---
.../amazon/cloud_manager/refresher_spec.rb | 67 ++++++++++++++++++++--
1 file changed, 63 insertions(+), 4 deletions(-)
diff --git a/spec/models/manageiq/providers/amazon/cloud_manager/refresher_spec.rb b/spec/models/manageiq/providers/amazon/cloud_manager/refresher_spec.rb
@jrafanie
jrafanie / initializers.txt
Created November 10, 2016 17:19
ManageIQ initializer names
initializing set_load_path (16 times)
initializing set_autoload_paths (16 times)
initializing add_routing_paths (16 times)
initializing add_locales (16 times)
initializing add_view_paths (16 times)
initializing load_environment_config (16 times)
initializing load_environment_hook
initializing load_active_support
initializing set_eager_load
initializing initialize_logger
@jrafanie
jrafanie / output.log
Created November 4, 2016 19:42
undefined method `definition' for #<Class:0x00000015145f90> doc formatter
$ bundle exec rake ${TEST_SUITE+test:$TEST_SUITE}
2 processes for 1078 specs, ~ 539 specs per process
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's 'rails' settings.
/home/travis/build/jrafanie/manageiq/spec/helpers/application_helper/buttons/role_suspend_spec.rb:50: warning: regular expression has ']' without escape
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's 'rails' settings.
Randomized with seed 816
@jrafanie
jrafanie / codeclimate-config.diff
Created October 20, 2016 14:54
codeclimate-config suggestion
diff --git a/.eslintrc b/.eslintrc
index e69de29..9faa375 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -0,0 +1,213 @@
+ecmaFeatures:
+ modules: true
+ jsx: true
+
+env:
@jrafanie
jrafanie / actual_results.log
Last active October 13, 2016 16:24
Output from codeclimate analyze for markdownlint and csslint
== .github/PULL_REQUEST_TEMPLATE.md (7 issues) ==
1: Line length [markdownlint]
4: Lists should be surrounded by blank lines [markdownlint]
5: Line length [markdownlint]
6: Line length [markdownlint]
8: First header should be a h1 header [markdownlint]
11: Bare URL used [markdownlint]
17: Line length [markdownlint]
== CHANGELOG.md (351 issues) ==
@jrafanie
jrafanie / churn_vs_complexity.rb
Last active July 15, 2016 14:58
Generate churn vs. complexity graphs for ManageIQ
require 'yaml'
require 'csv'
require 'parallel'
yml = `churn -d "07/15/15" -y`
changes = YAML.load(yml)[:churn][:changes]
require "csv"
def ignored?(file_path)
@jrafanie
jrafanie / gist:abd10640d31b88f77f7fcaaf6ef48b14
Created June 16, 2016 18:44
Fallout from fix of bundler path gems always causing re-resolve (https://github.com/bundler/bundler/pull/4618)
* Even with no changes to the gemspecs for path based gems, bundler will always
re-resolve.
* After fixing above, the following issues were uncovered because the re-resolve
was masking these problems.
1) When you have a path with multiple gemspecs in subdirectories:
When bundler creates a Bundler::Source::Path object at the toplevel directory,
it creates gem specifications for each gemspec but the path to the gemspec uses
the toplevel path and not the nested path.