Skip to content

Instantly share code, notes, and snippets.

View scarletquasar's full-sized avatar
:electron:
I may be slow to respond.

Scarlet Rose scarletquasar

:electron:
I may be slow to respond.
View GitHub Profile
@rphlmr
rphlmr / clear-db.ts
Last active May 13, 2025 10:53
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@Nick-Gabe
Nick-Gabe / setStyle.ts
Created June 23, 2022 23:52
Adds styles to a Html Element based on a CSS Object.
interface HTMLElement {
setStyle(newStyles: Partial<CSSStyleDeclaration>): void;
}
HTMLElement.prototype.setStyle = function (newStyles) {
for (let style in newStyles) {
this.style[style] = newStyles[style]!
}
}
@Grubba27
Grubba27 / proparoxitítona.ts
Created May 7, 2022 04:27
A simple typescript program to verify if the word is a portuguese proparoxitítona
type Reverse<A> =
`${A}` extends `${infer AH}${infer AT}`
? `${Reverse<AT>}${AH}` : A
type Digs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
type DigsNext<I = Digs, R = {}> =
I extends [infer Head, infer Next, ...infer Tail]
? DigsNext<[Next, ...Tail], R & Record<Head, Next>>
: { [K in keyof R]: R[K] }
@jeffque
jeffque / java-path.md
Last active July 8, 2024 19:05
Caminhos para começar a dominar o Java

Alguns passos a seguir rumo a dominação do Java:

  • Faz um CRUD Java
  • Faz um cli Java
  • Aprende a fazer um package Java
  • Aprende a consumir um package Java
  • Aprende a configurar e atualizar packages
  • Aprende a deploiar Java
  • Aprende a consumir requests usando Java
  • Aprende a usar databases no Java
@sibelius
sibelius / LookingForTheFirstJob.md
Last active July 3, 2023 08:48
Looking for the First Job state

Looking for the First Job

Versão em Português

This is a very common state for people in college, people before/after a bootcamp, or people from another area.

The first job will be the hardest one to get, but it will get easier over time.

The interview will be harder than the job itself