• 0 Posts
  • 11 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle

  • whats_all_this_then@lemmy.world
    cake
    toLinux@lemmy.worldDo you use aliases?
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    5 months ago

    Oh boy, my time to shine:

    • mkd - Create directory and immediately cd into it
    • dei - docker exec -i
    • dps - docker ps
    • mdocker - Switch to minikube’s docker context
    • n - nvim
    • n. - nvim .

    Node package managers

    Exampes use pnpm but I have them for yarn, npm, and bun too

    • pi - pnpm install
    • pd - pnpm run dev

    fzf stuff

    • sdh - Search home directory (directories, recursive)

    Meme

    • fuckyou - git push --force
    • nano - nvim

    Misc

    createpgdb - Create a postgres db on the given container with the given name

    Usage: createpgdb "postgres container" "db name"

    I have similar ones for dropdb and pg_dump. Here’s the command:

    f() { local __user; if [ -z $3 ]; then __user=postgres; else __user=$3; fi; docker exec -i $1 createdb -U $__user $2; unset -f f; }; f'