Skip to content

Instantly share code, notes, and snippets.

View a-b's full-sized avatar

AL Berez a-b

View GitHub Profile
@sj26
sj26 / LICENSE.md
Last active December 27, 2025 05:35
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@yurivish
yurivish / venn-diagrams.js
Last active December 26, 2020 03:20
Area-proportional Venn Diagrams
// Since `overlapArea` function is monotonic increasing, we can perform a
// simple bisection search to find the distance that leads to an overlap
// area within epsilon of the desired overlap.
function distanceForOverlapArea(r1, r2, desiredOverlap) {
// Ensure r1 <= r2
if (r1 > r2) {
var temp = r2;
r2 = r1;
r1 = temp;
}
@mlafeldt
mlafeldt / postmortem.md
Last active February 20, 2026 07:06
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@bishboria
bishboria / springer-free-maths-books.md
Last active July 10, 2026 21:22
Springer made a bunch of books available for free, these were the direct links
@a-b
a-b / README.md
Created November 26, 2015 08:46 — forked from wvengen/README.md
Ruby memory analysis over time

Finding a Ruby memory leak using a time analysis

When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.

There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the

@wvengen
wvengen / README.md
Last active January 15, 2026 11:08
Ruby memory analysis over time

Finding a Ruby memory leak using a time analysis

When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.

There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the

@landakram
landakram / code_of_conduct.md
Created October 20, 2015 01:46
East Bay Mobile Hack Night Code of Conduct

Code of Conduct

This code of conduct applies to members of the East Bay Mobile Hack Night meetup.

Our community is dedicated to creating an inclusive environment for everyone, regardless of gender, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, nationality, religion, or computing experience (or lack of any of the aforementioned).

We do not tolerate harassment of community members in any form. Harassment includes offensive verbal comments related to gender, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, nationality, religion, sexual images in public spaces, deliberate intimidation, stalking, following, photography or audio/video recording against reasonable consent, sustained disruption of talks or other events, inappropriate physical contact, and unwelcome sexual attention. Harassment does not need to be recognized as unwanted or unwelcome by anyone other than the person being harassed.

Be careful in the words that you choose.

@kylev
kylev / signals_badly.rb
Last active August 29, 2015 14:26
An exploration of common pitfalls in Ruby Exception/Signal handling.
#!/usr/bin/env ruby
# Some members of ruby community continue to misunderstand the interplay of
# signal handlers and exception handling. This is a brief exploration
# via examples. You can run them by uncommenting the invocations at
# the bottom. You can see their behavior with Ctrl-C.
#
# Some of the examples will require a kill -9 from another terminal to
# stop.
#
@mathisonian
mathisonian / index.md
Last active August 10, 2024 20:59
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@staltz
staltz / introrx.md
Last active July 18, 2026 04:20
The introduction to Reactive Programming you've been missing