Skip to content

Instantly share code, notes, and snippets.

Dave Paola dpaola2

View GitHub Profile
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
krasnoukhov /
Last active Feb 25, 2020
Profiling memory leaky Sidekiq applications with Ruby 2.1

My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.

As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.

I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.

So, in order to profile your worker, add this to your Sidekiq configuration:


Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

anonymous / gist:1772756
Created Feb 8, 2012
four chapters
View gist:1772756
Clone URL:
Tests for Chapter 1: rspec spec -e step1 --require ./spec/json_formatter.rb --format JSONFormatter
Tests for Chapter 2: rspec spec -e step2 --require ./spec/json_formatter.rb --format JSONFormatter
Tests for Chapter 3: rspec spec -e step3 --require ./spec/json_formatter.rb --format JSONFormatter
Tests for Chapter 4: rspec spec -e step4 --require ./spec/json_formatter.rb --format JSONFormatter
### First Steps
jamescasbon /
Created Dec 11, 2011
Pure python templates using with statement
A really stupid python template language inspired by coffeekup, markaby.
Do not use this code, it will ruin your day. A byproduct of insomnia.
This module defines a template language that allows us to do:
d = Doc()
anonymous /
Created Jun 2, 2011
Django on Heroku with Celery and Sentry
virtualenv --no-site-packages .
source bin/activate
bin/pip install Django psycopg2 django-sentry
bin/pip freeze > requirements.txt
bin/ startproject mysite
cat >.gitignore <<EOF
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
You can’t perform that action at this time.