Skip to content

Instantly share code, notes, and snippets.

@practicalli-johnny
Created November 30, 2022 16:16
Show Gist options
  • Save practicalli-johnny/04caf4525918a2319a9b228c5ece4086 to your computer and use it in GitHub Desktop.
Save practicalli-johnny/04caf4525918a2319a9b228c5ece4086 to your computer and use it in GitHub Desktop.

Hints on using the Terminal

Kitty terminal

fonts

kitty +list-fonts

kitty --debug-font-fallback

Launch a colour scheme (theme) browser to view and select from the available themes

kitty +kitten themes

Or set a specific theme if its name is known, e.g. GitHub-Light

kitty +kitten themes GitHub-Light 

Kitty SSH connections

Use +kitten ssh

kitty +kitten ssh remote-host-name-or-ip

Docker

Shell onto a docker container

On an Alpine Linux OS docker image, use sh shell (or ash - TBC)

docker exec -it container-name /bin/sh

On a debian / ubuntu based docker image use bash shell

docker exec -it container-name /bin/bash

Run mysql database image

docker run --rm -p 127.0.0.1:3306:3306  --name mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=dbname -e MYSQL_USER=dev -e MYSQL_PASSWORD=$DB_PASSWORD mysql:5.7

Run clojure tests in docker container that uses the alpine image (not for a multi-stage dockerfile as it would required code and tests to be in the run-time image)

docker run clojure-service-container sh -c "clojure -X:env/test:test/run"

The sh -c let you run any command inside your container, over-riding a CMD or entrypoint directive in the Dockerfile

Watching processes

https://github.com/sachaos/viddy

What the filesystem for changes

viddy ls -a ~/Downloads


## Install software

brew install emacs-plus@28 --with-native-comp --with-spacemacs-icon



github cli

brew install gh GITHUB_TOKEN= gh auth login




## MacOSX

Update the file space database

sudo /usr/libexec/locate.updatedb


fonts

brew tap homebrew/cask-fonts brew install --cask font-fira-code-nerd-font



Multiple java environments with jenv

jenv global system jenv versions whereis java ls -la /usr/bin/java ls -1 /Library/Java/JavaVirtualMachines cd /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/ jenv add $PWD





Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment