Skip to content

Instantly share code, notes, and snippets.

View josefarias's full-sized avatar

Jose Farias josefarias

View GitHub Profile
@nateberkopec
nateberkopec / 0_roadmap.md
Last active July 17, 2025 03:57
Speedshop Retainer Roadmap + Changelog

Speedshop Retainer Roadmap

This is the roadmap for the Speedshop Ruby on Rails performance retainer service. It was last updated March 28th, 2025. Items are in rough priority order.

In-Progress:

  1. Alerting, dashboards, key metrics, and ticket backlogs for all: We want everyone to be on the same footing with SLOs for queues and tracking our core set of 20 metrics, plus your app's specific key metrics (see next bullet), along with a ticket backlog for stuff to work on.

Upcoming:

<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active August 12, 2025 19:35
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active August 7, 2025 20:18
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@cpjolicoeur
cpjolicoeur / gist:3590737
Created September 1, 2012 23:15
Ordering a query result set by an arbitrary list in PostgreSQL

I'm hunting for the best solution on how to handle keeping large sets of DB records "sorted" in a performant manner.

Problem Description

Most of us have work on projects at some point where we have needed to have ordered lists of objects. Whether it be a to-do list sorted by priority, or a list of documents that a user can sort in whatever order they want.

A traditional approach for this on a Rails project is to use something like the acts_as_list gem, or something similar. These systems typically add some sort of "postion" or "sort order" column to each record, which is then used when querying out the records in a traditional order by position SQL query.

This approach seems to work fine for smaller datasets, but can be hard to manage on large data sets with hundreds (or thousands) of records needing to be sorted. Changing the sort position of even a single object will require updating every single record in the database that is in the same sort group. This requires potentially thousands of wri