(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| # transfer your public key to another computer | |
| # variables that need changing marked with <> | |
| public_key_path="<./ssh/machine-2/id_rsa.pub>" | |
| remote_username="<james>" | |
| remote_hostname="<192.168.x.x>" | |
| key=$(cat $public_key_path) && \ | |
| ssh $remote_username@$remote_hostname "echo $key >> ~/.ssh/authorized_keys" | |
For running GUI applications as another user
otheruser=<username>
xhost +SI:localuser:$otheruser
su $otheruser
...
| cd /tmp | |
| wget http://rsync.samba.org/ftp/rsync/src/rsync-3.1.1.tar.gz -O - | tar xz | |
| cd *rsync* | |
| ./configure | |
| make | |
| sudo make install | |
| make clean |
| { | |
| "compilerOptions": { | |
| "module": "commonjs", | |
| "noImplicitAny": true, | |
| "sourceMap": true, | |
| "outDir": "dist", | |
| "baseUrl": ".", | |
| "paths": { | |
| "*": ["node_modules/*"] | |
| }, |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Date struct { | |
| Day int | |
| Month int |
| package main | |
| import ( | |
| "net/http" | |
| "fmt" | |
| ) | |
| /* |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "net/http" | |
| "time" | |
| "github.com/go-chi/chi/middleware" | |
| "github.com/go-chi/chi/v5" |