Skip to content

Instantly share code, notes, and snippets.

View masadamsahid's full-sized avatar
🌴
On vacation

Maulana Adam Sahid masadamsahid

🌴
On vacation
View GitHub Profile
@t3dotgg
t3dotgg / try-catch.ts
Last active May 25, 2025 00:53
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;
};
// Run this command to generate base config and vs code settings:
// pnpm dlx @antfu/eslint-config@latest
import antfu from "@antfu/eslint-config";
export default antfu({
type: "app",
typescript: true,
formatters: true,
stylistic: {
@bmaupin
bmaupin / free-database-hosting.md
Last active May 23, 2025 19:31
Free database hosting
@bmaupin
bmaupin / free-backend-hosting.md
Last active May 23, 2025 07:43
Free backend hosting
@dedunumax
dedunumax / .gitignore Java
Last active May 20, 2025 19:58
A complete .gitignore file for Java.
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*