metadata fixes
This commit is contained in:
parent
6ccba626c8
commit
a15b565e09
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Base 16"
|
title: "Base 16"
|
||||||
tags: [ "Data" ]
|
tags: [ "data" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -5,5 +5,10 @@ tags: [ "data", "calendar", "daylight savings" ]
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
The UK government keeps an ics file with clock, [here](https://www.gov.uk/when-do-the-clocks-change/united-kingdom.ics).
|
The UK government keeps an `ics` file with clock.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
wget https://www.gov.uk/when-do-the-clocks-change/united-kingdom.ics
|
||||||
|
calcurse -i united-kingdom.ics
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ Install `opensmtpd` (or similar), then `ncat` or `nc` or `netcat` (this mysterio
|
|||||||
|
|
||||||
Start the `opensmtpd` service, then use netcat to speak with the mail-daemon:
|
Start the `opensmtpd` service, then use netcat to speak with the mail-daemon:
|
||||||
|
|
||||||
|
```sh
|
||||||
```
|
|
||||||
nc localhost 25
|
nc localhost 25
|
||||||
```
|
```
|
||||||
|
|
||||||
The computer should respond with code `220`, which means 'I am listening'.
|
The computer should respond with code `220`, which means 'I am listening'.
|
||||||
|
|
||||||
> 220 hex ESMTP OpenSMTPD
|
> 220 hex ESMTP OpenSMTPD
|
||||||
@ -40,7 +40,7 @@ Tell the mail daemon who you are in this format.
|
|||||||
|
|
||||||
Then tell it who you're sending to.
|
Then tell it who you're sending to.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
RCPT TO: <www@dmz.rs>
|
RCPT TO: <www@dmz.rs>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ You will find the email under `/var/spool` or `/var/mail` or similar.
|
|||||||
|
|
||||||
If unsure, just take a part of your email, like `FRAGMENT="turn off server please"`, then `grep` for it:
|
If unsure, just take a part of your email, like `FRAGMENT="turn off server please"`, then `grep` for it:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
sudo grep -r $FRAGMENT /var/spool/*
|
sudo grep -r $FRAGMENT /var/spool/*
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
title: "exiftool"
|
title: "exiftool"
|
||||||
tags: [ "Metadata" ]
|
tags: [ "metadata", "exifdata" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
Find metadata.
|
Find metadata:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
exiftool image.jpg
|
exiftool "$file".jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
Find info on all images in current directory.
|
Find info on all `.png` images in current directory.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
exiftool -ext .png .
|
exiftool -ext .png .
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -19,22 +19,14 @@ You can make this recurring with the -r switch.
|
|||||||
|
|
||||||
And overwrite all metadata:
|
And overwrite all metadata:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
exiftool -all= -overwrite_original -ext jpg .
|
exiftool -all= -overwrite_original -ext jpg .
|
||||||
```
|
```
|
||||||
(NB: This does not work on pdf data. See [here](pdf_erasure.md) for erasing all pdf data)
|
(NB: This does not work on pdf data. See [here](pdf_erasure.md) for erasing all pdf data)
|
||||||
|
|
||||||
Or just GPS data:
|
Or just GPS data:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
exiftool -gps:all= *.jpg
|
exiftool -gps:all= *.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the imagemagick tool:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
identify -verbose
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "gpg"
|
title: "gpg"
|
||||||
tags: [ "data", "GPG" ]
|
tags: [ "data", "gpg" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
- [Setup](gpg/basics.md)
|
- [Setup](gpg/basics.md)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "groff"
|
title: "groff"
|
||||||
tags: [ "Data" ]
|
tags: [ "data", "logic" ]
|
||||||
---
|
---
|
||||||
# Basic Documents
|
# Basic Documents
|
||||||
|
|
||||||
|
@ -4,57 +4,49 @@ tags: [ "Data" ]
|
|||||||
---
|
---
|
||||||
Get the basic config:
|
Get the basic config:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
mkdir ~/.config/khard
|
mkdir ~/.config/khard
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
cp /usr/share/doc/khard/examples/khard/khard.conf.example ~/.config/khard.conf
|
cp /usr/share/doc/khard/examples/khard/khard.conf.example ~/.config/khard.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
Short list
|
Short list
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard list
|
khard list
|
||||||
```
|
```
|
||||||
|
|
||||||
Longer list
|
Longer list
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard show
|
khard show
|
||||||
```
|
```
|
||||||
|
|
||||||
Show from addressbook 'work'
|
Show from addressbook 'work'
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard list -a work
|
khard list -a work
|
||||||
```
|
```
|
||||||
|
|
||||||
Make a new contact in address book 'family'
|
Make a new contact in address book 'family'
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard new -a family
|
khard new -a family
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard edit grampa
|
khard edit grampa
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard remove bob
|
khard remove bob
|
||||||
```
|
```
|
||||||
|
|
||||||
Move contact 'nina' from 'work' to 'home' address book.
|
Move contact 'nina' from 'work' to 'home' address book.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
khard move -a home nina -A work
|
khard move -a home nina -A work
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced
|
|
||||||
|
|
||||||
Merge:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
khard merge [-a source_abook] [-u uid|search terms [search terms ...]] [-A target_abook] [-U target_uid|-t target_search_terms]
|
|
||||||
```
|
|
||||||
|
|
||||||
|
14
data/pass.md
14
data/pass.md
@ -1,42 +1,42 @@
|
|||||||
---
|
---
|
||||||
title: "pass"
|
title: "pass"
|
||||||
tags: [ "data" ]
|
tags: [ "data" ]
|
||||||
|
requires: "GPG Basics"
|
||||||
---
|
---
|
||||||
[Video instructions](https://www.hooktube.com/watch?v=hlRQTj1D9LA)
|
|
||||||
|
|
||||||
Setup [gpg](./gpg.md) keys.
|
Setup [gpg](./gpg.md) keys.
|
||||||
|
|
||||||
Show your gpg secret it:
|
Show your gpg secret it:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
gpg --list-secret-keys
|
gpg --list-secret-keys
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use the id number under `sec` to make a pass repo:
|
Then use the id number under `sec` to make a pass repo:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
KEY="$(gpg --list-secret-keys | grep -m 1 -A1 '^sec' | tail -n 1)"
|
KEY="$(gpg --list-secret-keys | grep -m 1 -A1 '^sec' | tail -n 1)"
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
pass init $KEY
|
pass init $KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
To add a basic password, e.g. for `$WEBSITE`:
|
To add a basic password, e.g. for `$WEBSITE`:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
pass $WEBSITE
|
pass $WEBSITE
|
||||||
```
|
```
|
||||||
|
|
||||||
To insert a multiline password, e.g. with a login name:
|
To insert a multiline password, e.g. with a login name:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
pass add -m $WEBSITE
|
pass add -m $WEBSITE
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove a password:
|
Remove a password:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
pass rm $WEBSITE
|
pass rm $WEBSITE
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
title: "pdf to txt"
|
title: "pdf to txt"
|
||||||
tags: [ "data", "pdf", "ocr" ]
|
tags: [ "data", "pdf", "ocr" ]
|
||||||
---
|
---
|
||||||
How to translate pdf book images to text (results are very poor, and will need lots of corrections).
|
|
||||||
|
How to translate pdfs to text (results are very poor, and will need lots of corrections).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ This works everywhere, including in a bare-ass tty.
|
|||||||
|
|
||||||
Select a keymap, and create a new custom map.
|
Select a keymap, and create a new custom map.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
su root
|
su root
|
||||||
|
|
||||||
basemap=/usr/share/kbd/keymaps/i386/qwerty/pl1.map.gz
|
basemap=/usr/share/kbd/keymaps/i386/qwerty/pl1.map.gz
|
||||||
@ -22,7 +22,7 @@ gunzip -c $basemap | \
|
|||||||
|
|
||||||
Tell the system to use this keymap at startup by naming it in the `rc.conf` file:
|
Tell the system to use this keymap at startup by naming it in the `rc.conf` file:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
echo "KEYMAP=$newmap" >> /etc/rc.conf
|
echo "KEYMAP=$newmap" >> /etc/rc.conf
|
||||||
|
|
||||||
cat /etc/rc.conf
|
cat /etc/rc.conf
|
||||||
@ -33,24 +33,24 @@ reboot
|
|||||||
|
|
||||||
Set layout to British English.
|
Set layout to British English.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
setxkbmap -layout gb
|
setxkbmap -layout gb
|
||||||
```
|
```
|
||||||
|
|
||||||
Or Polish with:
|
Or Polish with:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
setxkbmap -layout pl
|
setxkbmap -layout pl
|
||||||
```
|
```
|
||||||
|
|
||||||
| Language | short |
|
| Language | short |
|
||||||
|:--------|:------|
|
|:---------|:------|
|
||||||
| Polish | pl |
|
| Polish | `pl` |
|
||||||
| Serbian | rs |
|
| Serbian | `rs` |
|
||||||
|
|
||||||
Set 'alt + shift', as the command which cycles through the British English, Polish and Serbian keyboard layout.
|
Set 'alt + shift', as the command which cycles through the British English, Polish and Serbian keyboard layout.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
setxkbmap -layout gb,pl,rs -option grp:alt_shift_toggle
|
setxkbmap -layout gb,pl,rs -option grp:alt_shift_toggle
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
title: "wifi"
|
title: "network"
|
||||||
tags: [ "Networking" ]
|
tags: [ "Networking" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
# Netstat Stuff
|
# Netstat Stuff
|
||||||
|
|
||||||
Stats on local net usage within domain.
|
Stats on local net usage within domain.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "wireguard"
|
title: "wireguard"
|
||||||
tags: [ "Networking", "VPN" ]
|
tags: [ "networking", "VPN" ]
|
||||||
---
|
---
|
||||||
<!--
|
<!--
|
||||||
from
|
from
|
||||||
@ -11,25 +11,22 @@ https://engineerworkshop.com/blog/how-to-set-up-wireguard-on-a-raspberry-pi/
|
|||||||
|
|
||||||
Install `wireguard-tools` on the server.
|
Install `wireguard-tools` on the server.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
sudo -i
|
su root
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /etc/wireguard
|
cd /etc/wireguard
|
||||||
```
|
```
|
||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wg genkey | tee server_private_key | wg pubkey > server_public_key
|
wg genkey | tee server_private_key | wg pubkey > server_public_key
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wg genkey | tee client_private_key | wg pubkey > client_public_key
|
wg genkey | tee client_private_key | wg pubkey > client_public_key
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
echo "
|
echo "
|
||||||
[Interface]
|
[Interface]
|
||||||
Address = 10.0.0.1/24
|
Address = 10.0.0.1/24
|
||||||
@ -98,6 +95,6 @@ Add multiple peers by copying the `[peer]` section (they each get called `peer`)
|
|||||||
|
|
||||||
Make a standard client configuration, then:
|
Make a standard client configuration, then:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
qrencode -t ansiutf8 < /etc/wireguard/mobile_user.conf
|
qrencode -t ansiutf8 < /etc/wireguard/mobile_user.conf
|
||||||
```
|
```
|
||||||
|
@ -1,60 +1,63 @@
|
|||||||
---
|
---
|
||||||
title: "wireless"
|
title: "wireless"
|
||||||
tags: [ "Networking" ]
|
tags: [ "networking" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
# Check wifi's working
|
Check wifi's working
|
||||||
```bash
|
|
||||||
|
```sh
|
||||||
lspci -k
|
lspci -k
|
||||||
```
|
```
|
||||||
|
|
||||||
Or for usb wifi:
|
Or for usb wifi:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
dmesg | grep usbcore
|
dmesg | grep usbcore
|
||||||
```
|
```
|
||||||
|
|
||||||
... and hopefully it'll say the new interface is registered.
|
...and hopefully it'll say the new interface is registered.
|
||||||
|
|
||||||
# Check if a wifi interface has been created
|
Check if a wifi interface has been created
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
ip link
|
ip link
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
...or
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
iw dev
|
iw dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Assuming it's wlan0, bring it up with
|
Assuming it's wlan0, bring it up with
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
ip link set wlan0 up
|
ip link set wlan0 up
|
||||||
```
|
```
|
||||||
|
|
||||||
Error messages probably means your wireless chipset requires a firmware to function. In this case, check the kernel messages for firmware being loaded
|
Error messages probably means your wireless chipset requires a firmware to function. In this case, check the kernel messages for firmware being loaded
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
dmesg | grep firmware
|
dmesg | grep firmware
|
||||||
```
|
```
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
|
|
||||||
iw doesn't do wpa/wpa2. wpa_supplicant does everything. iwd does everything except WEXT encryption.
|
- `iw` doesn't do wpa/wpa2.
|
||||||
|
- `iwd` does everything except WEXT encryption.
|
||||||
|
- `wpa_supplicant` does everything.
|
||||||
|
|
||||||
# Connecting
|
# Connecting
|
||||||
|
|
||||||
Get the link status:
|
Get the link status:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
iw dev wlan0 link
|
iw dev wlan0 link
|
||||||
```
|
```
|
||||||
|
|
||||||
Scan for available points:
|
Scan for available points:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
iw dev wlan0 scan
|
iw dev wlan0 scan
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -3,55 +3,55 @@ title: "wpa_supplicant"
|
|||||||
tags: [ "Networking" ]
|
tags: [ "Networking" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
wpa_supplicant configurations are stored in /etc/wpa_supplicant/wpa_supplicant-wlan0 (or equivalent).
|
`wpa_supplicant` configurations are stored in `/etc/wpa_supplicant/wpa_supplicant-wlan0` (or equivalent).
|
||||||
|
|
||||||
## WiFi Connection
|
## WiFi Connection
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wpa_cli
|
wpa_cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Once in, scan the network, add an empty place to store credentials, then input them.
|
Once in, scan the network, add an empty place to store credentials, then input them.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
scan
|
scan
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
scan_results
|
scan_results
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
add_network
|
add_network
|
||||||
```
|
```
|
||||||
|
|
||||||
This outputs a network number, e.g. '3'. This is the new network you'll work with.
|
This outputs a network number, e.g. '3'. This is the new network you'll work with.
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
set_network *3* ssid *"Kosachok Cafe"*
|
set_network *3* ssid *"Kosachok Cafe"*
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
set_network 3 psk *"Kosachok2019"*
|
set_network 3 psk *"Kosachok2019"*
|
||||||
```
|
```
|
||||||
|
|
||||||
OR (for no password)
|
OR (for no password)
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
set_network *3* key_mgmt NONE
|
set_network *3* key_mgmt NONE
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
enable_network 3
|
enable_network 3
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
save_config
|
save_config
|
||||||
```
|
```
|
||||||
|
|
||||||
This takes a while to connect, so to speed things up, restart the service:
|
This takes a while to connect, so to speed things up, restart the service:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
sudo sv restart wpa_supplicant
|
sudo sv restart wpa_supplicant
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -59,13 +59,13 @@ sudo sv restart wpa_supplicant
|
|||||||
|
|
||||||
You can script like this:
|
You can script like this:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wpa_cli add_network
|
wpa_cli add_network
|
||||||
```
|
```
|
||||||
|
|
||||||
That returns an ID, so you can say:
|
That returns an ID, so you can say:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
newNetwork="$(wpa_cli add_network)"
|
newNetwork="$(wpa_cli add_network)"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -73,19 +73,19 @@ Then `$newNetwork` would equal that number, and you can add/ remove networks wit
|
|||||||
|
|
||||||
But remember to escape the quotes, so adding a network would be:
|
But remember to escape the quotes, so adding a network would be:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wpa_cli set_network *3* psk *\""passphrase"\"*
|
wpa_cli set_network *3* psk *\""passphrase"\"*
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generating Keys Manually
|
## Generating Keys Manually
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wpa_passphrase [ssid] [password]
|
wpa_passphrase [ssid] [password]
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
wpa_passphrase 'Cafe Kosachok' 'Kosachok2019'
|
wpa_passphrase 'Cafe Kosachok' 'Kosachok2019'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user