Skip to content

Instantly share code, notes, and snippets.

View Handfish's full-sized avatar

Kenneth Udovic Handfish

View GitHub Profile
@subtleGradient
subtleGradient / AtomicComponent.ts
Last active January 3, 2026 13:42
Relay Effect component prop composition
import { Atom } from "@effect-atom/atom"
import * as AtomReact from "@effect-atom/atom-react"
import { type JSX, jsx } from "@effect-native/patterns/jsx-runtime"
import type * as Context from "effect/Context"
import { dual } from "effect/Function"
import * as Layer from "effect/Layer"
import type * as Types from "effect/Types"
export namespace AtomicComponent {
export interface FC<Props, E = never, R = never> {
@semikolon
semikolon / README.md
Created August 5, 2025 22:11
Claude Code + Serena MCP Auto-Wrapper - Zero-config per-project Serena instances

Claude Code + Serena MCP Auto-Wrapper

Zero-configuration automatic Serena MCP server management for Claude Code

Transparently starts exactly one Serena instance per project with unique ports. No per-project setup required!

✨ Features

  • Zero Configuration: Just run claude - Serena starts automatically
  • Per-Project Isolation: Each project gets its own Serena instance on unique ports (9000+)
@Butch78
Butch78 / cargo.toml
Last active April 9, 2024 05:22
1BRC
[package]
name = "rust_1brc"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
polars = { version = "0.36.2", features = ["csv", "lazy", "nightly", "streaming"]}
@madprops
madprops / timer.rb
Last active July 19, 2023 09:28
Timer manager ruby script
#!/usr/bin/env ruby
require "open3"
# Get input information using rofi
def get_input(prompt, data)
cmd = "rofi -dmenu -p '#{prompt}' -i"
stdin, stdout, stderr, wait_thr = Open3.popen3(cmd)
stdin.puts(data)
stdin.close
return stdout.read.strip
@spruce-bruce
spruce-bruce / CustomError.ts
Created November 5, 2022 23:49
Custom errors in typescript
/**
 * This CustomError type can safely be extened and your custom errors
 * will show up nicely in logs and anywhere else for that matter.
 *
 * Javascript errors break the prototype chain so if you want nice
 * errors that you can extend you need to do some work to restore it.
 *
 * shamelessly stolen from https://stackoverflow.com/a/48342359
 *****************/
export abstract class CustomError extends Error {
@thecodeboss
thecodeboss / prisma-slonik-usage.ts
Created July 22, 2022 22:01
Prisma/Slonik Usage Example
import { PrismaClient } from '@prisma/client';
import type { User } from '@prisma/client';
import { createPool, sql } from 'slonik';
export const buildBaseConnectionURL = (config) => {
return (
'postgresql://' +
config.DB_USER +
':' +
config.DB_PASS +
// Mixamo Animation downloadeer
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//
// How to use this script
// 1. Browse mixamo.com
// 2. Log in
// 3. Open JS console (F12 on chrome)
@degitgitagitya
degitgitagitya / .env
Last active February 8, 2026 13:01
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy