Skip to content

Instantly share code, notes, and snippets.

View saulin18's full-sized avatar
🏠
Working from home

Saúl Sondón saulin18

🏠
Working from home
View GitHub Profile
@saulin18
saulin18 / builder.ts
Created May 5, 2026 15:11
form-schema-builder with Zod
import * as z from "zod";
export type FormFieldType = "text" | "textarea" | "email" | "tel" | "number" | "select" | "multiselect" | "array" | "date";
export interface FormField {
name: string;
label: string;
type: FormFieldType;
required?: boolean;

Keeping up with python

Python is one of the tools in my toolbox, so I never used it exclusively. This means i need to get an update, occasionally.

Rant mode on

They want to have an expressive language, so they keep adding features upon features to it, instead of caring too much about performance (which means that no JIT - just-in-time compiler - has been added to cpython).

I would have thought that typescript is gaining over python on github, because node.js is JIT based, unlike cpython, but that guess was wrong: github article. The github article suggests a different reason:

Job hunting tips

/More Eitzes from me, 'Eitzes is billik' - advice comes cheap.../

This gist is my experience. In general: do not trust such advice. Somehow the market tends to change every few years, always be aware of that possibility and be on the look-out.

Kinds of companies to work for

You can work for a big established company or for a startup. With more advanced companies you have a less stressed environment / and a more steady job, kind of.

@saulin18
saulin18 / gist:ce079d31f8ca240c325316880c6b6bfd
Created April 30, 2026 12:58
Type-safe TS service registry
type ServiceA = Service<"ServiceA"> & {
name: "ServiceA";
foo: () => void;
};
type ServiceB = Service<"ServiceB"> & {
name: "ServiceB";
bar: () => void;
};
type Service<T extends string> = {
__brand: T;
@saulin18
saulin18 / crypto-wrong-answers.md
Created April 22, 2026 21:43 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
@saulin18
saulin18 / postgres_queries_and_commands.sql
Created March 9, 2026 16:48 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@saulin18
saulin18 / check.py
Created March 9, 2026 16:40 — forked from m-aciek/check.py
Alembic database freshness check.
from alembic import config
from alembic import script
from alembic.runtime import migration
import sqlalchemy
import exceptions
engine = sqlalchemy.create_engine(DATABASE_URL)
alembic_cfg = config.Config('alembic.ini')
@saulin18
saulin18 / python-testing.md
Created February 11, 2026 05:32 — forked from codeinthehole/python-testing.md
Python testing reference

Python testing reference

This document is a reference for common testing patterns in a Django/Python project using Pytest.

Contents:

@saulin18
saulin18 / README.md
Created February 11, 2026 05:14 — forked from devops-school/README.md
Complete Guide to Pytest: From Basics to Advanced

Complete Guide to Pytest: From Basics to Advanced

Pytest is a powerful Python testing framework that is widely used for unit testing, integration testing, and functional testing. This guide will take you step by step from basic to advanced features of Pytest, providing a comprehensive understanding of its capabilities.


Table of Contents

  1. Introduction to Pytest
  2. Setting Up Pytest