Skip to content

Instantly share code, notes, and snippets.

@skatenerd
skatenerd / bird_wadler.txt
Last active June 16, 2024 11:41
A gem from Bird and Wadler's Introduction to Functional Programming
"A good way to tackle such problems is to consider a simpler problem first.
There is, of course, no guarantee that solutions obtained for simpler problems
can be used directly in the problem which inspired them; they may only serve
to familiarise the solver with some of the features and difficulties involved.
Even so, the work is not wasted; familiarity with a problem is one of our most
important tools for solving it. And often we will be able to use the solution
directly or by adapting it."
!!!
@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active August 1, 2026 05:57
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@cuth
cuth / debug-scroll.md
Last active January 20, 2026 00:22
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right > w || b.left < 0) {
@nickloewen
nickloewen / bret_victor-reading_list.md
Last active August 9, 2026 20:58
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★