Skip to content

Instantly share code, notes, and snippets.

View sleeyax's full-sized avatar

Sleeyax sleeyax

View GitHub Profile
@productdevbook
productdevbook / drizzle-orm.md
Last active December 24, 2025 21:17
Drizzle ORM PostgreSQL Best Practices Guide (2025)

Drizzle ORM PostgreSQL Best Practices Guide (2025)

Latest Drizzle ORM features and optimal schema patterns

Major 2025 Update: PostgreSQL now recommends identity columns over serial types. Drizzle has fully embraced this change.

import { pgTable, integer, text, timestamp, varchar } from 'drizzle-orm/pg-core';
@WellDone2094
WellDone2094 / ThemeProvider.tsx
Last active December 20, 2025 21:06
Tan Stack Start Theme provider
'use client';
/*
This file is adapted from next-themes to work with tanstack start.
next-themes can be found at https://github.com/pacocoursey/next-themes under the MIT license.
*/
import * as React from 'react';
interface ValueObject {
@t3dotgg
t3dotgg / try-catch.ts
Last active December 27, 2025 22:26
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@mag37
mag37 / Windows 11 VM with VirtManager.md
Last active December 22, 2025 21:56
Windows 11 VM with VirtManager.md

Preparations

  • Install Virtual Machine Manager - probably in your repo with the name virt-manager
  • Install any other requirements for virtualization on your distro
  • Ensure any Virtualization options is enabled in Bios.
  • Get a windows11 iso download here
  • Get virtio drivers iso download here

Setup

  • Edit -> Preferences -> Enable XML editing
  • Create the VM but before Finish - check Customize conf before install
  • @Overview
@gitname
gitname / README.md
Last active June 10, 2024 09:20
Using `@react-pdf/renderer` with React 18

Using @react-pdf/renderer v3.0.1 with React 18

Introduction

When I tried to use the @react-pdf/renderer package (version 3.0.1) with a React 18 app, two problems arose. In this article, I'll describe those problems and tell you how I solved them.

Update: Here's a video demonstration of the problems and solution described in this article: https://youtu.be/YZP5r7Uy_bU

Problem 1: Dependency Conflict

@ff6347
ff6347 / docker-compose.yml
Created May 31, 2022 08:57
simple inbucket setup with nodemailer
version: '3.4'
services:
mail:
image: inbucket/inbucket:latest
environment:
NODE_ENV: production
ports:
- 9000:9000
{
"PX1": "no_script",
"PX2": "js_bootstrap",
"PX3": "domready",
"PX4": "fingerprint",
"PX6": "nav_timing",
"PX7": "incognito",
"PX8": "score_session",
"PX9": "score_impression",
"PX10": "ui_interaction",
@iMikio
iMikio / firestore.go
Last active June 25, 2023 03:01 — forked from roboncode/firestore.go
Firestore - GoLang Transform Struct To Map
package transform
import (
"reflect"
"strings"
"time"
)
const (
tagName = "firestore"
@glycerine
glycerine / go-env-with-msys2.md
Created April 26, 2020 01:07 — forked from voidexp/go-env-with-msys2.md
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.

@Techbrunch
Techbrunch / xamarin-reverse-engineering.md
Last active May 16, 2025 17:26
Xamarin Reverse Engineering

Notes:

Regarding the interception of HTTP:

We did it through USB reverse tunneling and iptable rules local to the phone.