Home.md
... ...
@@ -16,14 +16,18 @@
16 16
### programming
17 17
* [nubbins](programming/nubbins)
18 18
* [shell_scripts](/programming/shell_scripts)
19
+* [version control](/programming/index#vcs)
19 20
* [more...](/programming/index)
20 21
21 22
### other
23
+* [cloud_and_saas](/cloud_saas/index.md)
24
+* [filesystems](/filesystems/index)
25
+* [hardware](/hardware/index)
22 26
* [infrastructure-as-code](/iac/index)
23 27
* [networking](/networking/index)
28
+* [shells](/shells/index)
24 29
* [software](/software/index)
25
-* [hardware](/hardware/index)
26
-* [cloud_and_saas](/cloud_saas/index.md)
30
+* [virtualisation](/virtualisation/index)
27 31
28 32
## course notes
29 33
* [udmey](/udmey/index)
... ...
@@ -34,5 +38,6 @@
34 38
* [longbox](/unsorted/longbox)
35 39
* [new_blog](/unsorted/new_blog)
36 40
* [pinterest_ignore](/unsorted/pinterest_ignore)
41
+* [mailstack](unsorted/mailstack)
37 42
38 43
* [glossary](/glossary)
cloud_saas/index.md
... ...
@@ -1,4 +1,4 @@
1
-## cloud and saas
2
-* [azure](/cloud_saas/azure)
3
-* [openshift](/cloud_saas/openshift)
1
+# cloud and saas
4 2
3
+* [azure](azure)
4
+* [openshift](openshift)
glossary.md
... ...
@@ -1,4 +1,3 @@
1
-
2 1
# glossary
3 2
4 3
## a
... ...
@@ -79,7 +78,6 @@
79 78
80 79
## m
81 80
* [mail](/software/mail)
82
-* [mailstack](software/mailstack)
83 81
* [man_pages](/linux/man_pages)
84 82
* [mariadb](/software/mariadb)
85 83
* [mastodon](/software/mastodon)
hardware/index.md
... ...
@@ -1,6 +1,6 @@
1
-## hardware
2
-* [arduino](/hardware/arduino)
3
-* [trezor](/hardware/trezor)
4
-* [neos_smartcam](/hardware/neos_smartcam)
5
-* [wacom](/hardware/wacom)
1
+# hardware
6 2
3
+* [arduino](arduino)
4
+* [trezor](trezor)
5
+* [neos_smartcam](neos_smartcam)
6
+* [wacom](wacom)
iac/index.md
... ...
@@ -1,4 +1,3 @@
1
-### infrastructure-as-code
2
-* [ansible](iac/ansible)
3
-
1
+# infrastructure-as-code
4 2
3
+* [ansible](ansible)
linux/alsa.md
... ...
@@ -1,12 +0,0 @@
1
-# alsa
2
-
3
-## change card order
4
-- on a fresh archlinux install on a thinkpad the sound cards were in the 'wrong' order.
5
-- in alsamixer the first card was hdmi, the second was pch
6
-- to change the order add the following to '/etc/modprobe.d/50-alsa.conf' and reboot
7
-```
8
-options snd_hda_intel enable=1 index=0
9
-options snd_hda_intel index=1
10
-```
11
-
12
-- source: https://bbs.archlinux.org/viewtopic.php?pid=1453619#p1453619
linux/bluetooth.md
... ...
@@ -0,0 +1,51 @@
1
+# bluetooth
2
+
3
+## monitor bluetooth with tcpdump
4
+
5
+follow this [guide][]
6
+### pkg reqs
7
+- bluetoothd
8
+- bluetoothctl
9
+- tcpdump
10
+- libpcap
11
+- openssl
12
+
13
+on arch:
14
+```
15
+pacman -S extra/bluez extra/bluez-utils tcpdump libpcap openssl
16
+```
17
+
18
+start bluetooth service
19
+```
20
+systemctl start bluetooth
21
+```
22
+
23
+check state of bluetooth device
24
+```
25
+rfkill list bluetooth
26
+sudo rfkill unblock bluetooth
27
+rfkill list bluetooth
28
+```
29
+
30
+get bluetooth adaptor name
31
+```
32
+tcpdump -D
33
+```
34
+
35
+start tcpdump
36
+```
37
+tcpdump -i <bluetooth_adaptor> -w <output_file>.pcap
38
+```
39
+
40
+connect to bluetooth devices
41
+```
42
+bluetoothctl
43
+[bluetooth]# power on
44
+[bluetooth]# scan on
45
+[bluetooth]# trust <mac_address> # optional
46
+[bluetooth]# pair <mac_address>
47
+```
48
+
49
+
50
+
51
+[guide]: https://www.agnosticdev.com/content/how-capture-bluetooth-traffic-tcpdump-linux
linux/durdraw.md
... ...
@@ -0,0 +1,9 @@
1
+# durdraw
2
+
3
+```
4
+cd ~/src/warez/durdraw-venv
5
+source bin/activate
6
+../durdraw/durdraw
7
+```
8
+
9
+* `alt-q` to quit
linux/index.md
... ...
@@ -1,100 +1,95 @@
1
-
2 1
# linux
3 2
4 3
## a
5
-* [alsa](/linux/alsa)
6
-* [apt_dpkg](/linux/apt_dpkg)
7
-* [at](/linux/at)
4
+* [apt_dpkg](apt_dpkg)
5
+* [at](at)
8 6
9 7
## b
10
-* [bin](/linux/bin)
8
+* [bin](bin)
9
+* [bluetooth](bluetooth)
11 10
12 11
## c
13
-* [csgo](/linux/csgo)
12
+* [csgo](csgo)
14 13
15 14
## d
16
-* [dhcpcd](/linux/dhcpcd)
17
-* [dmidecode](/linux/dmidecode)
15
+* [dhcpcd](dhcpcd)
16
+* [dmidecode](dmidecode)
17
+* [durdraw](durdraw)
18 18
19 19
## e
20 20
21 21
## f
22
-* [fallout4](/linux/fallout4)
23
-* [ffmpeg](/linux/ffmpeg)
24
-* [flatpak](/linux/flatpak)
25
-* [fonts](/linux/fonts)
22
+* [fallout4](fallout4)
23
+* [flatpak](flatpak)
24
+* [fonts](fonts)
26 25
27 26
## g
28 27
29 28
## h
30 29
31 30
## i
32
-* [i3lock](/linux/i3lock)
33
-* [index](/linux/index)
34
-* [init](/linux/init)
31
+* [i3lock](i3lock)
32
+* [init](init)
35 33
36 34
## j
37
-* [journalctl](/linux/journalctl)
35
+* [journalctl](journalctl)
38 36
39 37
## k
40
-* [keymaps](/linux/keymaps)
38
+* [keymaps](keymaps)
41 39
42 40
## l
43
-* [logrotate](/linux/logrotate)
44
-* [lvm](/linux/lvm)
41
+* [logrotate](logrotate)
42
+* [lvm](lvm)
45 43
46 44
## m
47
-* [man_pages](/linux/man_pages)
48
-* [mbox](/linux/mbox)
49
-* [mdadm](/linux/mdadm)
50
-* [mount](/linux/mount)
51
-* [mpd](/linux/mpd)
52
-* [mpv](/linux/mpv)
45
+* [man_pages](man_pages)
46
+* [mount](mount)
47
+* [mpd](mpd)
48
+* [mpv](mpv)
53 49
54 50
## n
55 51
56 52
## o
57 53
58 54
## p
59
-* [pacman](/linux/pacman)
60
-* [pacmd](/linux/pacmd)
61
-* [pactl](/linux/pactl)
62
-* [processes](/linux/processes)
63
-* [python](/linux/python)
55
+* [pacman](pacman)
56
+* [pacmd](pacmd)
57
+* [pactl](pactl)
58
+* [processes](processes)
64 59
65 60
## q
66 61
67 62
## r
68
-* [ricing](/linux/ricing)
69
-* [rpm](/linux/rpm)
70
-* [rsync](/linux/rsync)
71
-* [rtv](/linux/rtv)
63
+* [ricing](ricing)
64
+* [rpm](rpm)
65
+* [rsync](rsync)
66
+* [rtv](rtv)
72 67
73 68
## s
74
-* [samba](/linux/samba)
75
-* [sar](/linux/sar)
76
-* [sed](/linux/sed)
77
-* [spotifyd](/linux/spotifyd)
78
-* [systemctl](/linux/systemctl)
79
-* [sysv](/linux/sysv)
69
+* [samba](samba)
70
+* [sar](sar)
71
+* [scanning](scanning)
72
+* [spotifyd](spotifyd)
73
+* [systemctl](systemctl)
74
+* [sysv](sysv)
80 75
81 76
## t
82
-* [truncate](/linux/truncate)
77
+* [truncate](truncate)
83 78
84 79
## u
85 80
86 81
## v
87 82
88 83
## w
89
-* [w3m](/linux/w3m)
84
+* [w3m](w3m)
90 85
91 86
## x
92
-* [xclip](/linux/xclip)
93
-* [xdotool](/linux/xdotool)
94
-* [xev](/linux/xev)
95
-* [xinput](/linux/xinput)
96
-* [xmodmap](/linux/xmodmap)
97
-* [xprop](/linux/xprop)
87
+* [xclip](xclip)
88
+* [xdotool](xdotool)
89
+* [xev](xev)
90
+* [xinput](xinput)
91
+* [xmodmap](xmodmap)
92
+* [xprop](xprop)
98 93
99 94
## y
100 95
linux/mbox.md
... ...
@@ -1,13 +0,0 @@
1
-# mbox
2
-
3
-```
4
-mail
5
-```
6
-* `+` open next mail
7
-* `-` open prev mail
8
-* `d` delete mail
9
- * `d 6 9` delete mail 6 & 9
10
- * `d 4-40` delete mails 4 to 40
11
- * `d*` delete all
12
-* `reply`
13
-* `h` print messages
linux/python.md
... ...
@@ -1,18 +0,0 @@
1
-# python
2
-
3
-## configuring [virtualenv][]
4
-- install package
5
- ```
6
- python3 -m pip install --user virtualenv
7
- ```
8
-- create virtualenv
9
- ```
10
- python3 -m virtualenv env_dir
11
- ```
12
-- activating and leaving virtualenv
13
- ```
14
- source env_dir/bin/activate
15
- deactivate
16
- ```
17
-
18
-[virtualenv]: https://packaging.python.org/guides/installing-using-pip-and-virtualenv/
linux/scanning.md
... ...
@@ -0,0 +1,24 @@
1
+# scanning
2
+
3
+[sane docs][]
4
+
5
+## usb scanner on arch linux
6
+```
7
+pacman -S sane ipp-usb
8
+systemctl enable ipp-usb
9
+systemctl start ipp-usb
10
+scanimage -L # check scanner is available
11
+scanimage --format=(pnm|png|tiff|jpeg) --output-file <filename> --progress
12
+scanimage --resolution 1200 >output.pnm
13
+```
14
+
15
+* if no format provided defaults to pnm
16
+* `man scanimage` for more options
17
+
18
+## convert to pdf
19
+* requires `imagemagick`
20
+```
21
+convert <filename> <new_filename>.pdf
22
+```
23
+
24
+[sane docs]: https://tldp.org/HOWTO/Scanner-HOWTO/index.html
linux/sed.md
... ...
@@ -1,34 +0,0 @@
1
-# sed
2
-
3
-print specific line number from file
4
-```
5
-sed 'n!d' file
6
-```
7
-
8
-add character
9
-```
10
-s/regex/&n/
11
-```
12
-
13
-convert first word before equals symbol from lower to upper
14
-_this is used in config files such as ifcfg to convert all variable names_
15
-```
16
-:%s/^[[:alpha:]_]\{1,\}=/\U&/
17
-```
18
-
19
-append line after match
20
-```
21
-sed '/match/a hello friend' filename
22
-```
23
-
24
-prepend line before match
25
-```
26
-sed '/match/i hello friend' filename
27
-```
28
-
29
-{upper,lower}case test
30
-```
31
-sed 's/[a-z].*=/\U&/' filename
32
-```
33
-_this example is for uppercasing var names in a rhel network config file_
34
-http://bigdatums.net/2017/09/30/how-to-uppercase-lowercase-text-with-sed/
networking/index.md
... ...
@@ -1,23 +1,25 @@
1
-## networking
2
-### adminstration
3
-* [dig](/networking/dig)
4
-* [nmcli](/networking/nmcli)
5
-* [subnet_cheatsheet](/networking/subnet_cheatsheet)
6
-* [wifi_connect](/networking/wifi_connect)
1
+# networking
7 2
8
-### connections
9
-* [mosh](/networking/mosh)
10
-* [rdp](/networking/rdp)
11
-* [ssh](/networking/ssh)
3
+## adminstration
4
+* [dig](dig)
5
+* [nmcli](nmcli)
6
+* [subnet_cheatsheet](subnet_cheatsheet)
7
+* [tcpdump](tcpdump)
8
+* [wifi_connect](wifi_connect)
12 9
13
-### firewalls
14
-* [iptables](/networking/iptables)
15
-* [firewalld](/networking/firewalld)
16
-* [pf](/networking/pf)
10
+## connections
11
+* [mosh](mosh)
12
+* [rdp](rdp)
13
+* [ssh](ssh)
17 14
18
-### proxy
19
-* [haproxy](/networking/haproxy)
20
-* [envoy](/networking/envoy)
15
+## firewalls
16
+* [iptables](iptables)
17
+* [firewalld](firewalld)
18
+* [pf](pf)
21 19
22
-### vpn
23
-* [openvpn](/networking/openvpn)
20
+## proxy
21
+* [haproxy](haproxy)
22
+* [envoy](envoy)
23
+
24
+## vpn
25
+* [openvpn](openvpn)
networking/iptables.md
... ...
@@ -1 +1,25 @@
1 1
# iptables
2
+
3
+```
4
+iptables -L
5
+```
6
+
7
+```
8
+iptables -S
9
+```
10
+
11
+* drop
12
+```
13
+iptables -L --line-numbers
14
+iptables -D INPUT <number>
15
+```
16
+
17
+## import / export
18
+see [guide][]
19
+
20
+```
21
+iptables-save > filename
22
+iptables-restore < filename
23
+```
24
+
25
+[guide]: https://www.digitalocean.com/community/tutorials/how-to-migrate-iptables-firewall-rules-to-a-new-server
networking/tcpdump.md
... ...
@@ -0,0 +1,21 @@
1
+# tcpdump
2
+
3
+## capture entire packet
4
+```
5
+tcpdump -nnvvXSs 1514 -i eth0
6
+```
7
+- nn : don't convert hostnames or port names
8
+- vv : verbosity level
9
+- X : payload. shows packet contents in both ASCII and HEX
10
+- S : prints absolute sequence numbers
11
+- s : set snaplen (in this case 1514)
12
+
13
+## read entire packet
14
+```
15
+tcpdump -qns 0 -A -r <filename>
16
+```
17
+- q : quiet
18
+- n : don't convert host names
19
+- s : set snaplen (0 means catch whole packets)
20
+- A : print each packet in ASCII
21
+- r : read from file
programming/git.md
... ...
@@ -0,0 +1,105 @@
1
+# git
2
+
3
+undo merge that hasn't been pushed
4
+```zsh
5
+git reset --merge HEAD~1
6
+```
7
+
8
+roll back hard
9
+```
10
+git reset --hard <commit/tag>
11
+```
12
+
13
+force push of a previous commit
14
+```
15
+git push -f origin <commit_id>:<branch>
16
+```
17
+
18
+delete remote branch
19
+```
20
+git push --delete origin <branch>
21
+```
22
+
23
+reset local branch after a forced-update (above)
24
+```
25
+git fetch
26
+git reset origin/<branch> --hard
27
+```
28
+
29
+renaming branch and updating remote
30
+```
31
+git branch -m old-name new-name
32
+git push origin --set-upstream new-name
33
+git push origin :old-name
34
+```
35
+
36
+set username for [single repo][]
37
+```
38
+git config user.username 'name'
39
+```
40
+
41
+set signing key for local repo
42
+```
43
+git config user.signingkey <id>
44
+```
45
+
46
+[signing][] commits
47
+```
48
+git commit -S -m 'msg'
49
+```
50
+
51
+compare diff between two commits
52
+```
53
+git diff <commit>...<commit>
54
+```
55
+
56
+stash
57
+```
58
+git stash
59
+git stash show
60
+```
61
+
62
+unstash
63
+```
64
+git stash pop
65
+```
66
+
67
+add remote origin
68
+```
69
+git remote add origin git@gitserver/path/to/repo
70
+```
71
+
72
+add multiple push repos
73
+```
74
+git remote set-url --add --push origin git@gitserver/original/repo
75
+git remote set-url --add --push origin https://gitserver/another/repo
76
+```
77
+
78
+archive branch
79
+```
80
+git archive --format zip --outpu /path/to/output.zip <branch>
81
+```
82
+
83
+## using `hub`
84
+### pull requests
85
+```
86
+hub pr list
87
+hub pr checkout <num>
88
+```
89
+
90
+## helpful links
91
+
92
+[making a pull request][]
93
+
94
+[branching and rebasing][]
95
+
96
+[branching model][]
97
+
98
+[merging and rebasing][]
99
+
100
+[making a pull request]: https://www.atlassian.com/git/tutorials/making-a-pull-request
101
+[branching and rebasing]: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
102
+[branching model]: https://nvie.com/posts/a-successful-git-branching-model/
103
+[single repo]: https://help.github.com/articles/setting-your-username-in-git/
104
+[merging and rebasing]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing
105
+[signing]: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work
programming/index.md
... ...
@@ -1,5 +1,16 @@
1
-## programming
2
-* [android](/programming/android)
3
-* [c](/programming/c)
1
+# programming
2
+
4 3
* [nubbins](programming/nubbins)
5
-* [shell_scripts](/programming/shell_scripts)
4
+
5
+## languages
6
+* [c](c)
7
+* [python](python)
8
+* [sed](sed)
9
+* [shell_scripts](shell_scripts)
10
+
11
+## utilities
12
+* [android](android)
13
+
14
+## vcs
15
+* [git](git)
16
+* [svn](svn)
programming/python.md
... ...
@@ -0,0 +1,18 @@
1
+# python
2
+
3
+## configuring [virtualenv][]
4
+- install package
5
+ ```
6
+ python3 -m pip install --user virtualenv
7
+ ```
8
+- create virtualenv
9
+ ```
10
+ python3 -m virtualenv env_dir
11
+ ```
12
+- activating and leaving virtualenv
13
+ ```
14
+ source env_dir/bin/activate
15
+ deactivate
16
+ ```
17
+
18
+[virtualenv]: https://packaging.python.org/guides/installing-using-pip-and-virtualenv/
programming/sed.md
... ...
@@ -0,0 +1,34 @@
1
+# sed
2
+
3
+print specific line number from file
4
+```
5
+sed 'n!d' file
6
+```
7
+
8
+add character
9
+```
10
+s/regex/&n/
11
+```
12
+
13
+convert first word before equals symbol from lower to upper
14
+_this is used in config files such as ifcfg to convert all variable names_
15
+```
16
+:%s/^[[:alpha:]_]\{1,\}=/\U&/
17
+```
18
+
19
+append line after match
20
+```
21
+sed '/match/a hello friend' filename
22
+```
23
+
24
+prepend line before match
25
+```
26
+sed '/match/i hello friend' filename
27
+```
28
+
29
+{upper,lower}case test
30
+```
31
+sed 's/[a-z].*=/\U&/' filename
32
+```
33
+_this example is for uppercasing var names in a rhel network config file_
34
+http://bigdatums.net/2017/09/30/how-to-uppercase-lowercase-text-with-sed/
programming/svn.md
... ...
@@ -0,0 +1,23 @@
1
+# svn
2
+
3
+[dave child cheatsheet][]
4
+
5
+[abbey workshop howto][]
6
+
7
+```
8
+svn checkout --username=pyratebeard http://example.com/svn/repo/trunk localrepo
9
+
10
+svn status
11
+
12
+svn update /path
13
+```
14
+
15
+only need add for new directories or files
16
+```
17
+svn add /path|file
18
+
19
+svn commit -m "message" /path|file
20
+```
21
+
22
+[dave child cheatsheet]: https://www.cheatography.com/davechild/cheat-sheets/subversion/
23
+[abbey workshop howto]: https://www.abbeyworkshop.com/howto/misc/svn01/
shells/index.md
... ...
@@ -0,0 +1,5 @@
1
+# shells
2
+
3
+* [bash](bash)
4
+* [ksh](ksh)
5
+* [zsh](zsh)
software/alsa.md
... ...
@@ -0,0 +1,12 @@
1
+# alsa
2
+
3
+## change card order
4
+- on a fresh archlinux install on a thinkpad the sound cards were in the 'wrong' order.
5
+- in alsamixer the first card was hdmi, the second was pch
6
+- to change the order add the following to '/etc/modprobe.d/50-alsa.conf' and reboot
7
+```
8
+options snd_hda_intel enable=1 index=0
9
+options snd_hda_intel index=1
10
+```
11
+
12
+- source: https://bbs.archlinux.org/viewtopic.php?pid=1453619#p1453619
software/bluetooth.md
... ...
@@ -1,51 +0,0 @@
1
-# bluetooth
2
-
3
-## monitor bluetooth with tcpdump
4
-
5
-follow this [guide][]
6
-### pkg reqs
7
-- bluetoothd
8
-- bluetoothctl
9
-- tcpdump
10
-- libpcap
11
-- openssl
12
-
13
-on arch:
14
-```
15
-pacman -S extra/bluez extra/bluez-utils tcpdump libpcap openssl
16
-```
17
-
18
-start bluetooth service
19
-```
20
-systemctl start bluetooth
21
-```
22
-
23
-check state of bluetooth device
24
-```
25
-rfkill list bluetooth
26
-sudo rfkill unblock bluetooth
27
-rfkill list bluetooth
28
-```
29
-
30
-get bluetooth adaptor name
31
-```
32
-tcpdump -D
33
-```
34
-
35
-start tcpdump
36
-```
37
-tcpdump -i <bluetooth_adaptor> -w <output_file>.pcap
38
-```
39
-
40
-connect to bluetooth devices
41
-```
42
-bluetoothctl
43
-[bluetooth]# power on
44
-[bluetooth]# scan on
45
-[bluetooth]# trust <mac_address> # optional
46
-[bluetooth]# pair <mac_address>
47
-```
48
-
49
-
50
-
51
-[guide]: https://www.agnosticdev.com/content/how-capture-bluetooth-traffic-tcpdump-linux
software/durdraw.md
... ...
@@ -1,9 +0,0 @@
1
-# durdraw
2
-
3
-```
4
-cd ~/src/warez/durdraw-venv
5
-source bin/activate
6
-../durdraw/durdraw
7
-```
8
-
9
-* `alt-q` to quit
software/esxi.md
... ...
@@ -1,61 +0,0 @@
1
-# esxi
2
-
3
-## list vms
4
-```
5
-esxcli vm process list
6
-```
7
-
8
-```
9
-vim-cmd vmsvc/getallvms
10
-```
11
-
12
-## create vm
13
-[steps taken from here](#ref#2)
14
-
15
-1. create vm folder
16
- ```
17
- mkdir /vmfs/volumes/datastore1/hostname/
18
- ```
19
-
20
-2. create hard disk
21
- ```
22
- vmkfstools -c 32G -a lsilogic hostname.vmdk
23
- ```
24
- * `-c` - createvirtualdisk
25
- * `-a` - adaptertype [buslogic|lsilogic|ide|lsisas|pvscsi]
26
- * `-d` - diskformat [zeroedthick|thin|eagerzeroedthick]
27
-
28
-3. create hostname.vmx file with following ([ref 3](#ref#3) for info on vmx files)
29
- ```
30
- config.version = "8"
31
- virtualHW.version= "7"
32
- guestOS = "winnetenterprise-64"
33
- memsize = "1024"
34
- displayname = "VirtualCenter"
35
- scsi0.present = "TRUE"
36
- scsi0.virtualDev = "lsilogic"
37
- scsi0:0.present = "TRUE"
38
- scsi0:0.fileName = "VirtualCenter.vmdk"
39
- ide1:0.present = "true"
40
- ide1:0.deviceType = "cdrom-image"
41
- ide1:0.filename = "/vmfs/volumes/4a68046d-2159a120-ebac-001a9253e68f/win2k3_x64.iso"
42
- ide1:0.startConnected = "TRUE"
43
- ethernet0.present= "true"
44
- ethernet0.startConnected = "true"
45
- ethernet0.virtualDev = "e1000"
46
- ```
47
-
48
-4. change permissions on vmx file
49
- ```
50
- chmod 744 hostname.vmx
51
- ```
52
-
53
-5. add vm to inventory
54
- ```
55
- vim-cmd solo/registervm /vmfs/volumes/datastore/hostname/hostname.vmx hostname
56
- ```
57
-
58
-## ref
59
-- :1: https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.solutions.doc%2FGUID-0A264828-3933-4F4F-82D7-B5006A90CDBA.html
60
-- :2: http://vm-help.com/esx40i/manage_without_VI_client_1.php
61
-- :3: http://sanbarrow.com/vmx.html
software/index.md
... ...
@@ -1,43 +1,58 @@
1 1
# software
2 2
3
-* [bluetooth](bluetooth)
3
+## audio
4
+* [alsa](alsa)
5
+
6
+## backups
4 7
* [borg](borg)
5
-* [certbot](certbot)
6
-* [django](django)
7
-* [durdraw](durdraw)
8
-* [esxi](esxi)
8
+
9
+## communication systems
9 10
* [exim4](exim4)
10
-* [ftp](ftp)
11
-* [gollum](gollum)
12 11
* [gopher](gopher)
13
-* [gpg](gpg)
14
-* [grafana](grafana)
15
-* [httpd](httpd)
16
-* [index](index)
17
-* [iptables](iptables)
18 12
* [irc](irc)
19
-* [latex](latex)
20
-* [ldap](ldap)
21 13
* [mail](mail)
22
-* [mailstack](mailstack)
23
-* [mariadb](mariadb)
24
-* [mastodon](mastodon)
25 14
* [mutt](mutt)
26
-* [nagios](nagios)
27
-* [nginx](nginx)
28
-* [ntfy](ntfy)
15
+* [usenet](usenet)
16
+
17
+## cryptography
18
+* [gpg](gpg)
29 19
* [openssl](openssl)
20
+* [veracrypt](veracrypt)
21
+
22
+## databases
23
+* [mariadb](mariadb)
30 24
* [oracle](oracle)
31
-* [pandoc](pandoc)
32
-* [peertube](peertube)
33 25
* [postgresql](postgresql)
34
-* [scanning](scanning)
26
+
27
+## internet protocols
28
+* [ftp](ftp)
29
+* [ldap](ldap)
35 30
* [snmp](snmp)
36
-* [tcpdump](tcpdump)
31
+
32
+## monitoring
33
+* [grafana](grafana)
34
+* [ntfy](ntfy)
35
+* [nagios](nagios)
36
+
37
+## terminals
37 38
* [tmux](tmux)
38
-* [usenet](usenet)
39
-* [veracrypt](veracrypt)
39
+
40
+## text editing
41
+* [gollum](gollum)
42
+* [latex](latex)
43
+* [pandoc](pandoc)
40 44
* [vim](vim)
41 45
* [vimwiki](vimwiki)
46
+
47
+## video
48
+* [ffmpeg](ffmpeg)
49
+
50
+## web services
51
+* [certbot](certbot)
52
+* [django](django)
53
+* [httpd](httpd)
54
+* [mastodon](mastodon)
55
+* [nginx](nginx)
56
+* [peertube](peertube)
42 57
* [wagtail](wagtail)
43 58
* [znc](znc)
software/iptables.md
... ...
@@ -1,25 +0,0 @@
1
-# iptables
2
-
3
-```
4
-iptables -L
5
-```
6
-
7
-```
8
-iptables -S
9
-```
10
-
11
-* drop
12
-```
13
-iptables -L --line-numbers
14
-iptables -D INPUT <number>
15
-```
16
-
17
-## import / export
18
-see [guide][]
19
-
20
-```
21
-iptables-save > filename
22
-iptables-restore < filename
23
-```
24
-
25
-[guide]: https://www.digitalocean.com/community/tutorials/how-to-migrate-iptables-firewall-rules-to-a-new-server
software/mailstack.md
... ...
@@ -1,16 +0,0 @@
1
-# mailstack
2
-
3
-* [2.5admins 128: some value](https://2.5admins.com/2-5-admins-128/)
4
-
5
-| component | software | |
6
-| --- | --- | --- |
7
-| smtp | postfix | |
8
-| imap | dovecot | |
9
-| webmail | roundcube | |
10
-| spam filter | spam assassin | do spam filter while smtp connection open - run spamd |
11
-| glue | postprox | |
12
-| antivirus | none | don't use clamav |
13
-| domain key signing | opendkim | |
14
-| get notifications about spam | dmarc | |
15
-
16
-* https://www.bsdhowto.ch/mxpop3.html
software/scanning.md
... ...
@@ -1,24 +0,0 @@
1
-# scanning
2
-
3
-[sane docs][]
4
-
5
-## usb scanner on arch linux
6
-```
7
-pacman -S sane ipp-usb
8
-systemctl enable ipp-usb
9
-systemctl start ipp-usb
10
-scanimage -L # check scanner is available
11
-scanimage --format=(pnm|png|tiff|jpeg) --output-file <filename> --progress
12
-scanimage --resolution 1200 >output.pnm
13
-```
14
-
15
-* if no format provided defaults to pnm
16
-* `man scanimage` for more options
17
-
18
-## convert to pdf
19
-* requires `imagemagick`
20
-```
21
-convert <filename> <new_filename>.pdf
22
-```
23
-
24
-[sane docs]: https://tldp.org/HOWTO/Scanner-HOWTO/index.html
software/tcpdump.md
... ...
@@ -1,21 +0,0 @@
1
-# tcpdump
2
-
3
-## capture entire packet
4
-```
5
-tcpdump -nnvvXSs 1514 -i eth0
6
-```
7
-- nn : don't convert hostnames or port names
8
-- vv : verbosity level
9
-- X : payload. shows packet contents in both ASCII and HEX
10
-- S : prints absolute sequence numbers
11
-- s : set snaplen (in this case 1514)
12
-
13
-## read entire packet
14
-```
15
-tcpdump -qns 0 -A -r <filename>
16
-```
17
-- q : quiet
18
-- n : don't convert host names
19
-- s : set snaplen (0 means catch whole packets)
20
-- A : print each packet in ASCII
21
-- r : read from file
unsorted/mailstack.md
... ...
@@ -0,0 +1,16 @@
1
+# mailstack
2
+
3
+* [2.5admins 128: some value](https://2.5admins.com/2-5-admins-128/)
4
+
5
+| component | software | |
6
+| --- | --- | --- |
7
+| smtp | postfix | |
8
+| imap | dovecot | |
9
+| webmail | roundcube | |
10
+| spam filter | spam assassin | do spam filter while smtp connection open - run spamd |
11
+| glue | postprox | |
12
+| antivirus | none | don't use clamav |
13
+| domain key signing | opendkim | |
14
+| get notifications about spam | dmarc | |
15
+
16
+* https://www.bsdhowto.ch/mxpop3.html
vcs/git.md
... ...
@@ -1,105 +0,0 @@
1
-# git
2
-
3
-undo merge that hasn't been pushed
4
-```zsh
5
-git reset --merge HEAD~1
6
-```
7
-
8
-roll back hard
9
-```
10
-git reset --hard <commit/tag>
11
-```
12
-
13
-force push of a previous commit
14
-```
15
-git push -f origin <commit_id>:<branch>
16
-```
17
-
18
-delete remote branch
19
-```
20
-git push --delete origin <branch>
21
-```
22
-
23
-reset local branch after a forced-update (above)
24
-```
25
-git fetch
26
-git reset origin/<branch> --hard
27
-```
28
-
29
-renaming branch and updating remote
30
-```
31
-git branch -m old-name new-name
32
-git push origin --set-upstream new-name
33
-git push origin :old-name
34
-```
35
-
36
-set username for [single repo][]
37
-```
38
-git config user.username 'name'
39
-```
40
-
41
-set signing key for local repo
42
-```
43
-git config user.signingkey <id>
44
-```
45
-
46
-[signing][] commits
47
-```
48
-git commit -S -m 'msg'
49
-```
50
-
51
-compare diff between two commits
52
-```
53
-git diff <commit>...<commit>
54
-```
55
-
56
-stash
57
-```
58
-git stash
59
-git stash show
60
-```
61
-
62
-unstash
63
-```
64
-git stash pop
65
-```
66
-
67
-add remote origin
68
-```
69
-git remote add origin git@gitserver/path/to/repo
70
-```
71
-
72
-add multiple push repos
73
-```
74
-git remote set-url --add --push origin git@gitserver/original/repo
75
-git remote set-url --add --push origin https://gitserver/another/repo
76
-```
77
-
78
-archive branch
79
-```
80
-git archive --format zip --outpu /path/to/output.zip <branch>
81
-```
82
-
83
-## using `hub`
84
-### pull requests
85
-```
86
-hub pr list
87
-hub pr checkout <num>
88
-```
89
-
90
-## helpful links
91
-
92
-[making a pull request][]
93
-
94
-[branching and rebasing][]
95
-
96
-[branching model][]
97
-
98
-[merging and rebasing][]
99
-
100
-[making a pull request]: https://www.atlassian.com/git/tutorials/making-a-pull-request
101
-[branching and rebasing]: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
102
-[branching model]: https://nvie.com/posts/a-successful-git-branching-model/
103
-[single repo]: https://help.github.com/articles/setting-your-username-in-git/
104
-[merging and rebasing]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing
105
-[signing]: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work
vcs/svn.md
... ...
@@ -1,23 +0,0 @@
1
-# svn
2
-
3
-[dave child cheatsheet][]
4
-
5
-[abbey workshop howto][]
6
-
7
-```
8
-svn checkout --username=pyratebeard http://example.com/svn/repo/trunk localrepo
9
-
10
-svn status
11
-
12
-svn update /path
13
-```
14
-
15
-only need add for new directories or files
16
-```
17
-svn add /path|file
18
-
19
-svn commit -m "message" /path|file
20
-```
21
-
22
-[dave child cheatsheet]: https://www.cheatography.com/davechild/cheat-sheets/subversion/
23
-[abbey workshop howto]: https://www.abbeyworkshop.com/howto/misc/svn01/
virtualisation/esxi.md
... ...
@@ -0,0 +1,61 @@
1
+# esxi
2
+
3
+## list vms
4
+```
5
+esxcli vm process list
6
+```
7
+
8
+```
9
+vim-cmd vmsvc/getallvms
10
+```
11
+
12
+## create vm
13
+[steps taken from here](#ref#2)
14
+
15
+1. create vm folder
16
+ ```
17
+ mkdir /vmfs/volumes/datastore1/hostname/
18
+ ```
19
+
20
+2. create hard disk
21
+ ```
22
+ vmkfstools -c 32G -a lsilogic hostname.vmdk
23
+ ```
24
+ * `-c` - createvirtualdisk
25
+ * `-a` - adaptertype [buslogic|lsilogic|ide|lsisas|pvscsi]
26
+ * `-d` - diskformat [zeroedthick|thin|eagerzeroedthick]
27
+
28
+3. create hostname.vmx file with following ([ref 3](#ref#3) for info on vmx files)
29
+ ```
30
+ config.version = "8"
31
+ virtualHW.version= "7"
32
+ guestOS = "winnetenterprise-64"
33
+ memsize = "1024"
34
+ displayname = "VirtualCenter"
35
+ scsi0.present = "TRUE"
36
+ scsi0.virtualDev = "lsilogic"
37
+ scsi0:0.present = "TRUE"
38
+ scsi0:0.fileName = "VirtualCenter.vmdk"
39
+ ide1:0.present = "true"
40
+ ide1:0.deviceType = "cdrom-image"
41
+ ide1:0.filename = "/vmfs/volumes/4a68046d-2159a120-ebac-001a9253e68f/win2k3_x64.iso"
42
+ ide1:0.startConnected = "TRUE"
43
+ ethernet0.present= "true"
44
+ ethernet0.startConnected = "true"
45
+ ethernet0.virtualDev = "e1000"
46
+ ```
47
+
48
+4. change permissions on vmx file
49
+ ```
50
+ chmod 744 hostname.vmx
51
+ ```
52
+
53
+5. add vm to inventory
54
+ ```
55
+ vim-cmd solo/registervm /vmfs/volumes/datastore/hostname/hostname.vmx hostname
56
+ ```
57
+
58
+## ref
59
+- :1: https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.solutions.doc%2FGUID-0A264828-3933-4F4F-82D7-B5006A90CDBA.html
60
+- :2: http://vm-help.com/esx40i/manage_without_VI_client_1.php
61
+- :3: http://sanbarrow.com/vmx.html
virtualisation/index.md
... ...
@@ -0,0 +1,7 @@
1
+# virtualisation
2
+
3
+* [docker](docker)
4
+* [esxi](esxi)
5
+* [lxc](lxc)
6
+* [qemu](qemu)
7
+* [virsh](virsh)