Skip to content

Instantly share code, notes, and snippets.

Noah Gibbs noahgibbs

View GitHub Profile
noahgibbs / discourse_jit_error.txt
Created Dec 4, 2018
Internal error during benchmarking 2.6.0pre3
View discourse_jit_error.txt
+ RUBYOPT=--jit
+ ./start.rb -i 10000 -w 100 -s 0 --no-warm-start -o data/
WARN: Unresolved or ambigious specs during Gem::Specification.reset:
unf_ext (>= 0)
Available/installed versions of this gem:
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
/home/ubuntu/.rvm/gems/ruby-2.6.0-preview3/gems/onebox-1.8.6/lib/onebox/preview.rb:5: warning: constant Net::HTTPServerException is deprecated
noahgibbs / action_cable_weird_shit.txt
Created Aug 3, 2018
View action_cable_weird_shit.txt
You can .send() from JavaScript and .receive() from Ruby. But if you use "action" as a field in the hash, it treats it as a named action and receive() doesn't work.
Reloading. In general, reloading is a weird process. Reloading the browser can sometimes but not always reload the Ruby classes. Channel objects don't seem to reliably reload on the Ruby side, just in general.
In the documentation, streams vs channels. How they're named, how they're used.
Multiple ActionCable servers. Which is why "disconnect" operates by sending a pub/sub message to all servers to disconnect everybody "identified_by" what you sent.
Identified_by. Never really explained. Seems to only be usable for .disconnect?
noahgibbs / gist:f006364c3b335046314d9cdcbaa5c4d6
Created Jul 16, 2018
Robert Pozen writing advice, very abbreviated notes
View gist:f006364c3b335046314d9cdcbaa5c4d6
Make an Outline:
* Brainstorm
* Categorize (arrange into categories and subcategories)
* Outline
* Provide the Reader with Context
* State the main theme
* Explain the organization (what you'll get, how you'll get it)
noahgibbs / index.html
Created May 23, 2017
Rails Ruby Bench Throughput by Ruby Version
View index.html
<!-- Embeddable, not full-page -->
<link type="text/css" rel="stylesheet" href="">
<link type="text/css" rel="stylesheet" href="">
<link type="text/css" rel="stylesheet" href="">
<!-- <link type="text/css" rel="stylesheet" href="css/extensions.css"> -->
<!-- Note: Rickshaw uses D3.js version 3, not 4 -->
<script src=""></script>
<script src=""></script>
noahgibbs / benchmark_data.txt
Created Apr 19, 2017
Raw run data from Rails Ruby Bench
View benchmark_data.txt
Ruby Version: 2.0.0, data points: 15000, full runs: 10
0%ile: 0.0068682490000000485
1%ile: 0.011501136530000072
5%ile: 0.022750594349999993
10%ile: 0.035768121299999844
50%ile: 0.1570052820000003
90%ile: 0.3480380704999999
95%ile: 0.41832731610000007
99%ile: 0.6091764846900004
100%ile: 1.117286536
View gist:3b020be537471e05b66b0aed6c5bef40
C02RP0G1G8WM:rails_ruby_bench noah.gibbs$ rvm install ruby-head
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/noah.gibbs/.rvm/rubies/ruby-head, this may take a while depending on your cpu(s)...
HEAD is now at ff3496b011 vm_insnhelper.c: block argument at tailcall
remote: Counting objects: 751, done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 751 (delta 364), reused 330 (delta 330), pack-reused 336
Receiving objects: 100% (751/751), 645.53 KiB | 0 bytes/s, done.
noahgibbs / nested_exception.rb
Created Dec 16, 2016
Sample Ruby code with nested exceptions - use Ruby 2.3.0 or higher
View nested_exception.rb
class LibraryError < RuntimeError; end
class AppError < RuntimeError; end
# Library code
def library_call
raise"Something went wrong")
View self_vars.rb
class ParentClass
puts "Self when defining ParentClass: #{self.class} / #{self.inspect}"
def parent_method
puts "Self inside parent_method: #{self.class} / #{self.inspect}"
module MyModule
def self.module_obj_method
puts "Self inside module_obj_method: #{self.class} / #{self.inspect}"
View index.html
<h1>D3 Shaded Globe</h1>
<!-- Add scripts for topoJson, jQuery -->
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src="//" ></script>
<div class="world-map"
style="position: relative; height: 500px">
noahgibbs / rickshaw_xkcd_test.html
Created Mar 1, 2013
The full basic Rickshaw XKCD renderer.
View rickshaw_xkcd_test.html
<!doctype html>
<script src=""></script>
<script src=""></script>
<div id="chart"></div>
// Return an xinterp function for a given graph
function xinterp_on_graph(graph) {
You can’t perform that action at this time.