Skip to content

Instantly share code, notes, and snippets.

View Diogomartf's full-sized avatar
🤙
being positive

Diogo Ferreira Diogomartf

🤙
being positive
View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active March 12, 2025 22:35
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@kconner
kconner / macOS Internals.md
Last active March 17, 2025 10:04
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@tobi
tobi / kindle.rb
Last active September 25, 2022 02:37
Download your Kindle Highlights to local markdown files. Great for Obsidian.md.
#!/usr/bin/env ruby
# gem install active_support
require 'active_support/inflector'
require 'active_support/core_ext/string'
# gem install webrick (only ruby3)
require 'webrick'
# gem install mechanize
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@antoniocapelo
antoniocapelo / use-scroll-listener.js
Last active July 8, 2019 09:57
Custom React Hook for setting a passive scroll listener and get updated scrollY and scroll direction information
/**
* useScrollListener hook
* Usage: const { scrollY, scrollDirection } = useScrollListener();
*/
import { useState, useRef, useEffect } from 'react';
export function useScroll() {
const [scrollY, setScrollY] = useState(0);
const [progress, setProgress] = useState(0);
@swalkinshaw
swalkinshaw / tutorial.md
Last active February 26, 2025 21:15
Designing a GraphQL API
@captainsafia
captainsafia / deploy.js
Last active September 16, 2017 11:06
A quick Node script to allow multi-environment deploys with now
#! /usr/bin/env node
'use strict';
const program = require('commander');
const fs = require('fs');
const { spawn } = require('child_process');
program
.version('1.0.0')
.option('-e, --environment <environment>', 'Environment to deploy to')

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@tomas-stefano
tomas-stefano / Capybara.md
Last active December 6, 2024 09:30
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 27, 2024 17:06
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style