Skip to content

Instantly share code, notes, and snippets.

View sjobe's full-sized avatar

Serign Jobe sjobe

  • Bay Area, California
View GitHub Profile
@ericelliott
ericelliott / essential-javascript-links.md
Last active December 10, 2025 04:01
Essential JavaScript Links
@equivalent
equivalent / bootstrap_breadcrumbs_builder.rb
Last active August 29, 2015 13:58 — forked from riyad/bootstrap_breadcrumbs_builder.rb
breadcrumbs_on_rails for Bootstrap 3 override
# The BootstrapBreadcrumbsBuilder is a Bootstrap compatible breadcrumb builder.
# It provides basic functionalities to render a breadcrumb navigation according to Bootstrap's conventions.
#
# Originally from https://gist.github.com/riyad/1933884/ modified for Bootstrap 3 and "Go to hell with separator, use Css Dumbass"
# policy
#
# You can use it with the :builder option on render_breadcrumbs:
# <%= render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder" %>
#
#
@apgordon
apgordon / gist:9766971
Created March 25, 2014 17:33
Text Hockey v2 - in progress 3/25/14
#text hockey
$players = []
$player_location = [1,2,3,1,2,2]
$location_desc = {0 => "behind own net", 1 => "in your defensive zone", 2 => "at center ice", 3 => "in the attacking zone", 4 => "behind CPU's goal"}
$possession = [0,0,0,0,0,0]
$score = [0,0]
$action = [0,4+rand(4)]
$shot_pct = [0, 0.001, 0.01, 0.25, 0.05]
def add_players
@apgordon
apgordon / gist:8983518
Created February 13, 2014 20:48
Initial testing of Classes in Ruby
class Player
def initialize(name, poss, shoot_pct, pass_pct)
@name = name
@@poss = poss
@shoot_pct = shoot_pct
@pass_pct = pass_pct
end
def shoot
rand = rand(0)
@jboner
jboner / latency.txt
Last active December 13, 2025 00:11
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD