Skip to content
On this page

Dev Dump 2023

  • markdown-it

Docker

bash
# https://hub.docker.com/_/debian
docker pull debian:bookworm-slim
## create it once, --rm to remove it after
docker run -it --rm debian:bookworm-slim bash
## might need /bin/bash or /bin/sh or /bin/zsh or /bin/ash (alpine) or maybe even /usr/bin/env bash
docker run -it debian:bookworm-slim bash
## -d detach, -p port, -v volume
docker run -it -d debian:bookworm-slim bash

## attach to main process
docker attach <container id>
docker attach <container name>
## exec - spawn new process inside of docker
docker exec -it <container id> bash
### remove after
docker exec -it --rm <container id> bash

# Local Dockerfile. -t, --tag
docker build -t <name> .
## detach
#ctrl+p, ctrl+q



## list
docker ps
docker container ls
docker container ls -a

## start
docker start <container id>
docker start <container name>
## remove
docker stop <container id>
docker stop <container name>
docker rm --name <container name>
docker rm <container id>
docker rmi <image id>

Docker / Selenium Grid / Chrome Driver

Compose

  • find and add
  • also --gpu etc. -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix

Asciinema

Git

bash
alias gcm='git fetch origin;git checkout main;git fetch origin --prune'
# git fetch origin --prune --dry-run does the same thing as git remote prune origin --dry-run
# it should be noted that git fetch origin --prune --dry-run does not actually prune anything, it just tells you what would be pruned if you ran git fetch origin --prune
git fetch origin --prune --dry-run
git fetch origin --prune
bash
git rev-list --left-right --count main...some-branch
powershell
# https://stackoverflow.com/questions/13064613/how-to-prune-local-tracking-branches-that-do-not-exist-on-remote-anymore
# windows apparently
# force
git branch --v | ? {$_.contains('[gone]')} | % {$_.trim().split()[0].trim()} | % {git branch -D $_}
# normal
git branch --v | ? {$_.contains('[gone]')} | % {$_.trim().split()[0].trim()} | % {git branch -d $_}

# test
cd C:\Users\$(whoami)\WebstormProjects\vite-press-docs\docs\src
cd C:\Users\$(whoami)\WebstormProjects\vite-press-docs
git branch --v | ? {$_.contains('[gone]')} | % {$_.trim().split()[0].trim()} | % {write-host $_}
git branch --v | ? {$_.contains('[gone]')} | % {$_.trim().split()[0].trim()} | % {write-host -nonewline "$_`: " ; git rev-list --left-right --count main...$_}
bash
git fetch origin --prune --dry-run
# https://git-scm.com/docs/git-gc

git branch --v
# * jc-git-notes           ab805a6 added docker notes etc... (#30)
# * jc-git-notes           07803ad added docker notes etc...
# dont run
git prune --dry-run
# git fetch origin --prune
git prune -nv

Tools

  • Mocha
  • Webstorm
  • vscode
  • sublime
  • bash profiles
  • vue download... etc
  • ahk... / wsl cmds?
  • Conda / Jupyter!
  • Chatgpt tempalte
  • Puppeteer

Github actions

  • oauth? firebase auth?
  • Migrate...

Firebase

Nuxt?

Browserify / Stackblitz / Puppeteer

PNPM

bash
# https://pnpm.io/installation
npm install -g pnpm
pnpm add -g pnpm

#pnpm-workspace.yaml
https://pnpm.io/pnpm-workspace_yaml
# upgrade
touch pnpm-workspace.yaml
## maybe write quick script to do this

# https://pnpm.io/cli/update
pnpm update --workspace
# or just up
# --interactive
pnpm prune