Skip to content

Instantly share code, notes, and snippets.

View OlaoluwaM's full-sized avatar
🧠
Always learning

Olaoluwa (Ola) Mustapha OlaoluwaM

🧠
Always learning
View GitHub Profile
@OlaoluwaM
OlaoluwaM / row-hascodec.hs
Last active May 5, 2025 21:39
row type HasCodec instance attempt
-- Necessary Language extensions
import Autodocodec (HasCodec (codec), bimapCodec, (.=))
import Autodocodec qualified as Auto
import Control.Lens
import Data.Row
import Data.Row.Records ()
import Data.Row.Records qualified as Rec
import Data.Text qualified as T
import GHC.OverloadedLabels (IsLabel (fromLabel))
@OlaoluwaM
OlaoluwaM / node-typescript-esm.md
Created December 5, 2023 10:08 — forked from khalidx/node-typescript-esm.md
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@OlaoluwaM
OlaoluwaM / iterm2.md
Created January 9, 2023 19:22 — forked from squarism/iterm2.md
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
echo-server-epoll
echo-server-poll
talk
talk.dSYM
@OlaoluwaM
OlaoluwaM / postgres-cheatsheet.md
Created August 17, 2022 22:33 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@OlaoluwaM
OlaoluwaM / BDLinux.md
Created July 6, 2022 15:10 — forked from ObserverOfTime/BDLinux.md
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@OlaoluwaM
OlaoluwaM / namedParams.test.ts
Last active June 25, 2022 13:04
A way of invoking your functions with a named parameter technique as opposed to positional parameters. Really useful in functional programming where there is a great emphasis on the manipulation of function shapes
// test #1
const exampleFn = (a: number, b:string, c: boolean) => [a, b, c]
const namedParamExampleFn = toNamedParams(exampleFn)
console.log(namedParamExampleFn({c: true, a: 1}))
// test #2
function testFn(a: number, b: string) {
return a + b
@OlaoluwaM
OlaoluwaM / README-Fancy.md
Created May 29, 2022 05:57 — forked from ramantehlan/README-Fancy.md
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index