Skip to content

Instantly share code, notes, and snippets.

View madyanalj's full-sized avatar

Madyan madyanalj

View GitHub Profile
@madyanalj
madyanalj / README.md
Last active April 19, 2022 16:36
TypeScript Enums vs Literal Unions

Enum Pros

  • native TS langugae server (which IDEs use by default) supports jumping to usages of enum keys (pretty sure it's possible to do this with unions using extensions/JetBrains, but it's not built-in into vscode at the moment)
  • more familiar (as it's used in many programming languages)

Literal Union Pros

  • could be easily extended:
    type UkCity = "london" | "edinburgh"
@madyanalj
madyanalj / vim-cheat-sheet.md
Last active January 1, 2021 08:15
Vim As Your Editor Cheat Sheet

Vim As Your Editor Cheat Sheet 🤓

This is a cheat sheet for the Vim As Your Editor series by ThePrimeagen

Part 1 - The Basic Vim Movements

j and k - move down and up

h and l - move left and right

@madyanalj
madyanalj / index.pug
Created June 6, 2018 22:07
Wikipedia Concept
//- Add tags/description to CodePen
#app
ma-header
ma-article
//--- Vue component definitions ---//
script#ma-header(type='text/x-template')
div