Skip to content

Instantly share code, notes, and snippets.

View prakashmurthy's full-sized avatar

Prakash Murthy prakashmurthy

View GitHub Profile
@prakashmurthy
prakashmurthy / thousands_of_assignments.rb
Last active August 16, 2016 21:04
Executable test script for rails issue #26122
##############################################################################
# thousands_of_assignments.rb
# Script for https://github.com/rails/rails/issues/26122
##############################################################################
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
@prakashmurthy
prakashmurthy / my_assignment_test.rb
Last active August 17, 2016 13:53
Files for adding a new test in rails codebase for issue #26122
# activerecord/test/cases/my_assignment_test.rb
require "cases/helper"
require "models/stat"
class MyAssignmentTest < ActiveRecord::TestCase
ActiveRecord::Schema.define do
create_table :stats, force: true do |t|
t.integer :count, default: 0
end
end
@prakashmurthy
prakashmurthy / trace.rb
Last active September 1, 2016 20:30
tracing system stack error when there is no stack trace
$enable_tracing = false
$trace_out = open('trace.txt', 'w')
set_trace_func proc { |event, file, line, id, binding, classname|
if $enable_tracing && event == 'call'
$trace_out.puts "#{file}:#{line} #{classname}##{id}"
end
}
$enable_tracing = true
@prakashmurthy
prakashmurthy / gist:45802e036e658708f4d6c59352413f2f
Created February 26, 2019 17:13
Medium article titled 'Sorry, Y’all, but Climate Change Ain’t the First Existential Threat'
Sorry, Y’all, but Climate Change Ain’t the First Existential Threat
Go to the profile of Mary Annaïse Heglar
Mary Annaïse Heglar
Feb 18
URL: https://medium.com/@maryheglar/sorry-yall-but-climate-change-ain-t-the-first-existential-threat-b3c999267aa0
Dear Climate Movement:
I’m with you when you say that climate change is the most important issue facing mankind. I’ll even go so far as to say it’s the most important one ever.