This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.org $8000 | |
.org $ff00 | |
XAML = $24 ; Last "opened" location Low | |
XAMH = $25 ; Last "opened" location High | |
STL = $26 ; Store address Low | |
STH = $27 ; Store address High | |
L = $28 ; Hex value parsing Low | |
H = $29 ; Hex value parsing High | |
YSAV = $2A ; Used to see if hex value is given |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# find ruby-prof gem on global scope | |
@ruby_prof_path = `cd .. && gem which ruby-prof` | |
if path.blank? | |
# install ruby-prof if we can't find it | |
`cd .. && gem install ruby-prof` | |
@ruby_prof_path = `cd .. && gem which ruby-prof` | |
end | |
@ruby_prof_path = @ruby_prof_path.sub(/ruby-prof.rb\n/, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ObjectComparisonHelper | |
def deep_hash_diff(obj1, obj2, path = 'root', differences = []) | |
if obj1.class != obj2.class | |
differences << "object types differ at #{path}: #{obj1.class} vs #{obj2.class}" | |
else | |
case obj1 | |
when Hash, HashWithIndifferentAccess | |
differences << "key sets differ at #{path}: #{obj1.keys.inspect} vs #{obj2.keys.inspect}" if obj1.keys.to_set != obj2.keys.to_set | |
obj1.each do |key, value| | |
deep_hash_diff(value, obj2[key], "#{path}.#{key}", differences) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Action button on the top navigation menu. Useful for resource with nested resources | |
action_item :only => :show do | |
link_to('Show Users', admin_group_users_path(resource)) | |
end | |
# Custom show page with children items | |
show do |