Skip to content

Instantly share code, notes, and snippets.

View whomwah's full-sized avatar

Duncan Robertson whomwah

View GitHub Profile
@whomwah
whomwah / README.md
Created January 29, 2020 09:57
[TMUX] #tmux

Start new session with name

tmux new -s mysession

Attach to existing session

tmux a -t mysession

Attach to last session

tmux a

List sessions

@whomwah
whomwah / docker.md
Last active June 19, 2019 09:43
[Docker] useful commands #docker

Execute an interactive bash shell on the container

docker exec -it app-accounting bash

Remove unused volumes

$ docker volume rm (docker volume ls -q -f dangling=true)

Remove all images

@whomwah
whomwah / gist:2018051
Last active April 11, 2019 08:06
xattr OSX privs

Use the xattr command. You can inspect the extended attributes:

$ xattr s.7z
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine
and use the -d option to delete one extended attribute:

$ xattr -d com.apple.quarantine s.7z
$ xattr s.7z
@whomwah
whomwah / README.md
Last active February 15, 2025 10:51
[unix] #unix #ssh

Manually setting the date and time

$ sudo date MMDDhhmmYYYY

MM - Two digit month number
DD - Two digit date
hh - Two digit 24 hour system hour
mm - Two digit minute
YYYY - Four digit year code