Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Oct 28, 2023
1 parent bee7648 commit e669535
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/software/cheatsheet/exiftool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Rename all files so their filename is the creation date timestamp:

```shell
exiftool -d '%Y-%m-%d_%H%M%S.%%e' '-filename<CreateDate' .
```

Set the metadata timestamp to match the filename:
```shell
exiftool "-datetimeoriginal<filename" -overwrite_original ./
# or
exiftool "-alldates<filename" -overwrite_original ./
```

Clear all exif data:
```shell
exiftool -all= −overwrite_original ./
```
19 changes: 19 additions & 0 deletions docs/software/cheatsheet/remote-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ systemctl list-timers

```

## journalctl
```shell
journalctl --since 08:55:00 --no-pager | less
```

## sysstat
Install sysstat
```shell
sudo apt install sysstat
sed -i 's/ENABLED="false"/ENABLED="true"/' /etc/default/sysstat
systemctl restart sysstat sysstat-collect.timer sysstat-summary.timer
```

Then inspect:

```shell
sar -r -q -f /var/log/sysstat/{sa_for_that_day} -s 17:50:01 -e 18:01:01
```

## Unexpected pod restarts
Get restart count per pod:
```bash
Expand Down
17 changes: 17 additions & 0 deletions docs/software/cheatsheet/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,20 @@ ssh -i ~/secrets/tailscale-ssh \
-o "StrictHostKeyChecking no" \
user@remote
```

## Generate SSH key for GitHub
```shell
ssh-keygen -t ed25519 -C "82407168+sed-i@users.noreply.github.com" -N "" -f github_ssh
```

Refs:
[1](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent),
[2](https://github.com/settings/keys)
[3](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key)

Then,
```shell
git config --global gpg.format ssh
git config --global user.signingkey /PATH/TO/github_ssh.pub
git config --global commit.gpgsign true # sign all commit by default (optional)
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ nav:
- 'Remote host': 'software/cheatsheet/remote-host.md'
- 'SSH': 'software/cheatsheet/ssh.md'
- 'Privacy online': 'software/cheatsheet/privacy-online.md'
- 'Exif tool': 'software/cheatsheet/exiftool.md'
- Reference:
- 'Get up to speed': 'software/reference/get-up-to-speed.md'
- Culture: 'software/reference/culture.md'
Expand Down

0 comments on commit e669535

Please sign in to comment.