Skip to content

Instantly share code, notes, and snippets.

View jimzer's full-sized avatar
🎯
Focusing

JimZer jimzer

🎯
Focusing
View GitHub Profile
@jimzer
jimzer / repro.py
Created September 8, 2026 11:45
rq: result_ttl evicts a dependency while its dependent is still DEFERRED (rq/rq#2452)
"""result_ttl evicts a dependency while its dependent is still DEFERRED.
The whole chain is enqueued up front. Two dependencies finish at different times, so the
result_ttl of the first one elapses before the dependent is allowed to run.
pip install rq
python repro.py # needs a Redis on localhost, or set REDIS_URL
"""
import os
@jimzer
jimzer / effect-tanstack-hooks.ts
Created June 3, 2025 19:52
Type-safe Effect-TS + React Query integration. Auto-generates useQuery/useMutation hooks with full TypeScript inference from Effect API clients.RetryClaude can make mistakes. Please double-check responses.
import { Api } from "@api/domains/api";
import {
FetchHttpClient,
HttpApiClient,
type HttpClient,
type HttpClientResponse,
} from "@effect/platform";
import { Fetch } from "@effect/platform/FetchHttpClient";
import {
type UseMutationOptions,
@jimzer
jimzer / install-postgres-12.sh
Last active May 8, 2021 16:17
Install Postgres 12
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Update the package lists:
sudo apt-get update
# Install the latest version of PostgreSQL.
@jimzer
jimzer / install-fish.sh
Last active July 10, 2021 14:31
Install fish with Oh My Fish and Bob The Fish theme
sudo apt-get update -y &&
sudo apt-get install -y fish &&
chsh -s `which fish` &&
fish &&
curl -L https://get.oh-my.fish | fish &&
omf install bobthefish
@jimzer
jimzer / test.ts
Created October 25, 2020 14:07
Gist Test
import axios from "axios";
const githubClient = axios.create({
baseURL: "https://api.github.com/",
timeout: 1000,
//headers: { "X-Custom-Header": "foobar" },
});
export default class Gist {
constructor() {}