Skip to content

Instantly share code, notes, and snippets.

View hahmed's full-sized avatar

Haroon Ahmed hahmed

View GitHub Profile
@hahmed
hahmed / http3_and_quic_local_dev.md
Last active July 22, 2026 13:53
HTTP/3 (QUIC) in local development: the certificate-root problem

HTTP/3 (QUIC) in local development: the certificate-root problem

Getting HTTP/3 to work on localhost is not the same as getting HTTPS to work on localhost. A cert that gives you a green padlock over TCP can still leave the browser silently refusing to ever speak HTTP/3 to the same origin. This writes up why, how to diagnose it, and what actually fixes it.

It's browser-agnostic in principle but the sharp edges below are Chromium's (Chrome/Edge/Brave); other browsers differ, so test them separately.

@hahmed
hahmed / structs_test.rb
Last active September 6, 2023 08:05
Structs vs classes
# SORBET_RUNTIME_DEFAULT_CHECKED_LEVEL=never RUBY_YJIT_ENABLE=1 ruby structs_test.rb
# SORBET_RUNTIME_DEFAULT_CHECKED_LEVEL=never ruby structs_test.rb
# SORBET_RUNTIME_DEFAULT_CHECKED_LEVEL=always ruby structs_test.rb
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
@hahmed
hahmed / template.rb
Created February 27, 2023 22:59
set the console to pry
initializer 'myveryfirstinitializer.rb', <<-CODE
Rails.application.configure do
console do
require "pry"
config.console = Pry
require "awesomecompany"
end
end
CODE
@hahmed
hahmed / output.txt
Created December 21, 2022 22:22
Build and install yjit fails because rust
ruby master % ./configure --enable-yjit --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc
make -j install
checking for ruby... /Users/haroon/.rubies/ruby-2.6.5/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking target system type... x86_64-apple-darwin21.6.0
checking for cl.exe... no
checking for clang... clang
@hahmed
hahmed / Gemfile
Created June 26, 2020 07:40 — forked from dhh/Gemfile
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
data:image/gif;base64,R0lGODlhyADIAPf/ACYMAysVBS8VBTAXBTAbCDQWBTYgDDcbCTkmETsvGEQtF0UeCkkjDkk0HUk5IUomEUtAKE4tFlEnEVJDKlQpE1gyGlg4IVhMM1otFFpCKl42HmAtEGBNNWBVPGQ/JmVFLGY5H2ZjR2dcQmk1FGouC2pNNGpVPG9CJXFFKnFHLnFVPHFbQnFjSXFxVHJQN3NLMnOIZnc4D3hGJXhIKnhJLHhJL3hWPHhbQnhiSHhqT3h1WHlKMXlNNH5KLH5MMX5PNH6KaoFKJoFaQII/EoJeQ4KXdoNPLINRMYNRNINTNoNVOYNwVYRZO4RhRYRkSoVHGoiJaolqTYl3Wol8YImohYxTLIxXN4xkSI2XeI5JF45dPI5wVI9fQZFPHZJrTZNYMpNkQpOEZpOLbZRlR5ZyVJdfNpd5W5hWJZhqR5htTpliO5qnh5xTGp1XIJ1dK52TdJ2cfJ9pQ59sSp9yUaB4WKFxTqF8XqGNbqJwSaJ3U6OJZ6SDY6a1ladfJKdjL6hqN6h3Uqh8WqlxRqmnhq13S618V6+VdbCGY7FmK7GCWbGEXrJtNbKKZrKefrN+VbOQbLVsLradeLaxkra7m7dyN7d3RLikfrl9SbmEV7mWdLmoh7nIqLqJYbqPar50NL+ZdL+decB3OMCIWcCOZcGETcKXb8V8OsV+QcWVacaac8eGT8ejfsiDQsiNVsiQY8ieecmogsrStMu4mcvFpMyykM2EQM2FRs2OVM2tis6JSM+XZdCec9GjedGogdKHQ9Kda9SNTdWLRtWMSdWUVdaRTdieatqidNuQStuthNzNrd2TTN2TT96VT96dX9+YVOCYUOCpd+C4k+DCnOGcVeGfZ+KlauWaUuacVuedU+eeVeiyg+mgVumhX+qjWOqoZ+ylX+2kWe3PrO+oX++vdfClWvCpZvDEmfKoW/KvafOrX/OtZvSpXfWsYPawZ/a2c/exaPm1bfq6dfrCgfy+eGdxUq3KqM
@hahmed
hahmed / shipping.md
Created April 30, 2020 15:38
shipping

Ship it

@hahmed
hahmed / coding.md
Created April 30, 2020 15:35
coding

Coding

@hahmed
hahmed / github-desktop.md
Created December 31, 2018 23:05
Clone rails/rails issue

Cloning into '/Users/haroon/projects/rails'... remote: Enumerating objects: 128, done.
remote: Counting objects: 0% (1/128)
remote: Counting objects: 1% (2/128)
remote: Counting objects: 2% (3/128)
remote: Counting objects: 3% (4/128)
remote: Counting objects: 4% (6/128)
remote: Counting objects: 5% (7/128)
remote: Counting objects: 6% (8/128)
remote: Counting objects: 7% (9/128)

@hahmed
hahmed / congif.yml
Created May 23, 2018 11:46
Circle ci setup
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.1-node-browsers