grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

commit e3abf9b755c7590065f0eefa367022cc2ccfaddc
parent b3a074e1be7606c7826ca637a5bd666b4c9ee239
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue,  1 Oct 2019 18:56:39 +0100

Merge remote-tracking branch 'refs/remotes/origin/master'

Diffstat:
MHome.md | 2++
Mcustom.css | 134++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Afonts/saxmono-webfont.woff | 0
Mtechnology/linux/audio_visual/ffmpeg.md | 6++++++
Mtechnology/linux/general/keymaps.md | 13+++++++++++--
Mtechnology/linux/general/ssh.md | 7+++++++
Mtechnology/networking/subnet_cheatsheet.md | 38+++++++++++++++++++++++++++-----------
Atechnology/websites/httpd.md | 6++++++
8 files changed, 131 insertions(+), 75 deletions(-)

diff --git a/Home.md b/Home.md @@ -16,6 +16,7 @@ 7. [monitoring](#technology_monitoring) 8. [networking](#technology_networking) 9. [virtualisation](#technology_virtualisation) + 10. [websites](#technology_websites) ## coding - [android](coding/android) @@ -100,3 +101,4 @@ ### websites - [django](technology/websites/django) +- [httpd](technology/websites/httpd) diff --git a/custom.css b/custom.css @@ -1,148 +1,158 @@ @font-face { - font-family: 'goudy_bookletter_1911regular'; - src: url('fonts/goudy_bookletter_1911-webfont.eot'); - src: url('fonts/goudy_bookletter_1911-webfont.eot?#iefix') format('embedded-opentype'), - url('fonts/goudy_bookletter_1911-webfont.woff') format('woff'), - url('fonts/goudy_bookletter_1911-webfont.ttf') format('truetype'), - url('fonts/goudy_bookletter_1911-webfont.svg#goudy_bookletter_1911regular') format('svg'); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: 'envy'; - src: url('fonts/envy_code_r.eot'); - src: url('fonts/envy_code_r.eot?#iefix') format('embedded-opentype'), - url('fonts/envy_code_r.woff2') format('woff2'), - url('fonts/envy_code_r.woff') format('woff'), - url('fonts/envy_code_r.ttf') format('truetype'), - url('fonts/envy_code_r.svg') format('svg'); + font-family: 'saxmono'; + src: url('/fonts/saxmono-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } body { - background: #111111; - color: #abc0c5; - font-family: 'goudy_bookletter_1911regular'; + background: #202224; + color: #beced0; + font-family: 'saxmono'; font-size: 16px; letter-spacing: .3px; } #head { border-bottom: none; + text-transform: uppercase; } h1, h2, h3, h4 { - color: #5a7588; + color: #cd6e42; font-weight: normal; + text-transform: uppercase; } -.markdown-body { - font-size: 16px; +#head h1 { + font-size: 1.5em; } .markdown-body h2, .markdown-body h3, .markdown-body h4 { - color: #5a7588; + color: #646086; font-weight: normal; border-bottom: none; + text-transform: uppercase; +} +.markdown-body h2 .fa-link, +.markdown-body h3 .fa-link, +.markdown-body h4 .fa-link { + color: #3d4047; +} +.markdown-body h2 { + font-size: 1.5em; } -.markdown-body h2 .fa-link { - color: #abc0c5; +.markdown-body h3 { + font-size: 1.3em; +} +.markdown-body h4 { + font-size: 1em; } a, a:link, a:visited { - color: #776e89; + color: #62a8b2; } a:active, a:hover, a:focus { - color: #a29076; + color: #33708c; text-decoration: none; } .markdown-body code { - background-color: #222222; - color: #5c8676; - font-family: 'envy'; + background-color: #3d4047; + color: #beced0; + font-family: 'saxmono'; font-size: 13px; - padding: 5px 4px 2px 4px; - border-radius: 0px; - border-color: #222222; + padding: 1px 1px 1px 1px; + border-radius: 5px; + border-color: #3d4047; } .markdown-body pre { - background: #111111; - color: #4f8396; - font-family: 'envy'; - border-radius: 0px; - border-color: #444444; + background: #161719; + color: #dceef1; + font-family: 'saxmono'; + border-radius: 5px; + border-color: #76b660; border-width: 1px; - border-style: none; - border-left-style: solid; + border-style: solid; } .markdown-body pre code { - color: #4f8396; - font-family: 'envy'; + color: #dceef1; + font-family: 'saxmono'; white-space: pre-wrap; } .highlight .nt { - color: #4f8396; + color: #beced0; } .markdown-body ul { - list-style: ':: ' + list-style: '- ' +} +.markdown-body table thead { + text-transform: uppercase; + font-size: 16px; + text-align: left; } .markdown-body table tr, .markdown-body table tr:nth-child(2n) { - background-color: #111111; + background-color: #161719; } .markdown-body table tr th, .markdown-body table tr td { - border: 1px solid #444444; + border: 1px solid #3d4047; } .minibutton a { - background: #111111; - color: #abc0c5; + background: #161719; + color: #beced0; border: none; text-shadow: none; - text-transform: lowercase; } .minibutton a:active, .minibutton a:hover, .minibutton a:focus { - background: #111111; - color: #a29076; + background: #161719; + color: #33708c; border: none; text-shadow: none; } #head #searchbar div#searchbar-fauxtext { - border-color: #222222; - background: #222222; + border-color: #3d4047; + background: #161719; } #head #searchbar div#searchbar-fauxtext input#search-query, #head #searchbar div#searchbar-fauxtext input#search-query.ph { - background: #111111; - color: #abc0c5; - font-family: 'goudy_bookletter_1911regular'; + background: #161719; + color: #beced0; + font-family: 'saxmono'; } #head #searchbar div#searchbar-fauxtext a#search-submit { - background: #111111; - border-color: #222222; + background: #161719; + border-color: #3d4047; } #head #searchbar div#searchbar-fauxtext a#search-submit span { background-position: -431px -25px; } .results h1 strong { - color: #4f8396; + color: #76b660; font-weight: normal; } .results p#no-results strong { - color: #8b5c51; + color: #8d3636; font-weight: normal; } +#error { + background-color: #161719; + border: none; +} +#error h1 { + color: #cd6e42; +} .page #footer { border-top: none; + margin-left: 10px; } #footer p#last-edit, #footer p#last-edit b { - color: #444444; + color: #3d4047; font-weight: normal; } diff --git a/fonts/saxmono-webfont.woff b/fonts/saxmono-webfont.woff Binary files differ. diff --git a/technology/linux/audio_visual/ffmpeg.md b/technology/linux/audio_visual/ffmpeg.md @@ -25,3 +25,9 @@ ffmpeg -f alsa -ac 2 -i alsa -f x11grab -r 15 -i :0.0 -acodec libmp3lame -vcode ``` ffmpeg -i videofile.mp4 videofile.webm ``` + +### adjust crf +adjust constant rate factor to lower bit rate +``` +ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4 +``` diff --git a/technology/linux/general/keymaps.md b/technology/linux/general/keymaps.md @@ -1,12 +1,21 @@ # keymaps -check keymaps +## check keymaps ``` localectl status ``` -changes required to load keys +## changes required to load keys ``` vconsole.conf /etc/X11/xorg.conf.d/00-keyboard.conf ``` + +## use capslock as escape and control +using xcape capslock can be set to 'escape' when tapped and 'ctrl' when help down. +``` +setxkbmap -option ctrl:nocaps +xcape -e 'Control_L=Escape' +``` + +[ref](https://www.dannyguo.com/blog/remap-caps-lock-to-escape-and-control) diff --git a/technology/linux/general/ssh.md b/technology/linux/general/ssh.md @@ -34,6 +34,13 @@ ssh -X user@host ``` - on server side `X11Forwarding` must be set to `yes` in '/etc/ssh/sshd_config' +## ssh host fingerprint +to find the fingerprint of a host +``` +sudo ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key +sudo ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key +``` + ## remote host id has changed if the fingerprint for the remote host has changed (and you are sure it's not a mitm attack) run the following to remove from 'known_hosts' diff --git a/technology/networking/subnet_cheatsheet.md b/technology/networking/subnet_cheatsheet.md @@ -2,6 +2,7 @@ https://oav.net/mirrors/cidr.html +``` Netmask Netmask (binary) CIDR Notes _____________________________________________________________________________ 255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr) @@ -40,7 +41,9 @@ _____________________________________________________________________________ 192.0.0.0 11000000.00000000.00000000.00000000 /2 128.0.0.0 10000000.00000000.00000000.00000000 /1 0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space +``` +``` Net Host Total Net Addr Addr Addr Number Class Range NetMask Bits Bits of hosts @@ -59,8 +62,10 @@ K 222-223 255.255.255.254 31 1 2 (reserved) (ref: RFC1375 & http://www.iana.org/assignments/ipv4-address-space ) ( http://www.iana.org/numbers.htm ) ---------------------------------------------------------- +``` The current list of special use prefixes: +``` 0.0.0.0/8 127.0.0.0/8 192.0.2.0/24 @@ -69,14 +74,16 @@ The current list of special use prefixes: 192.168.0.0/16 169.254.0.0/16 all D/E space -(ref: RFC1918 http://www.rfc-editor.org/rfc/rfc1918.txt ) -( or ftp://ftp.isi.edu/in-notes/rfc1918.txt ) -(rfc search: http://www.rfc-editor.org/rfcsearch.html ) -( http://www.ietf.org/ietf/1id-abstracts.txt ) -( http://www.ietf.org/shadow.html ) +``` +- (ref: RFC1918 http://www.rfc-editor.org/rfc/rfc1918.txt ) +- ( or ftp://ftp.isi.edu/in-notes/rfc1918.txt ) +- (rfc search: http://www.rfc-editor.org/rfcsearch.html ) +- ( http://www.ietf.org/ietf/1id-abstracts.txt ) +- ( http://www.ietf.org/shadow.html ) Martians: (updates at: www.iana.org/assignments/ipv4-address-space ) +``` no ip source-route access-list 100 deny ip host 0.0.0.0 any deny ip 0.0.0.0 0.255.255.255 any log ! antispoof @@ -114,7 +121,9 @@ Martians: (updates at: www.iana.org/assignments/ipv4-address-space ) deny ip 224.0.0.0 15.255.255.255 any log ! unless MBGP-learned routes deny ip 224-239/8 0.255.255.255 any log ! IANA - Multicast deny ip 240-255/8 0.255.255.255 any log ! IANA - Reserved +``` +``` filtered source addresses 0/8 ! broadcast 10/8 ! RFC 1918 private @@ -127,8 +136,10 @@ filtered source addresses 240.0.0.0/5 ! class E reserved 248.0.0.0/5 ! reserved 255.255.255.255/32 ! broadcast +``` ARIN administrated blocks: (http://www.arin.net/regserv/IPStats.html) +``` 24.0.0.0/8 (portions of) 63.0.0.0/8 64.0.0.0/8 @@ -145,16 +156,18 @@ ARIN administrated blocks: (http://www.arin.net/regserv/IPStats.html) 208.0.0.0/8 209.0.0.0/8 216.0.0.0/8 +``` ---------------------------------------------------------- well known ports: (rfc1700.txt) - www.iana.org/assignments/port-numbers + - www.iana.org/assignments/port-numbers protocol numbers: - www.iana.org/assignments/protocol-numbers - www.iana.org/numbers.htm + - www.iana.org/assignments/protocol-numbers + - www.iana.org/numbers.htm ICMP(Types/Codes) +``` Testing Destination Reachability & Status (0/0) Echo-Reply (8/0) Echo @@ -205,12 +218,14 @@ ICMP(Types/Codes) (30/0) Traceroute (31/0) Conversion-Error (32/0) Mobile-Redirect +``` Ref: [RFC 792] [RFC 896] [RFC 950] [RFC 1016] www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/sw_5_3/cofigide/qos.htm#19774 +``` Decimal system Prefix's Factor Exponent Prefix --------------------------------------------------- @@ -236,9 +251,10 @@ Decimal system Prefix's 0.000 000 000 000 000 000 000 001...10^-24...yocto --------------------------------------------------- -Convert Fahrenheit <> Celsius: - Celsius = (Fahrenheit - 32) / 1.8 - Fahrenheit = (Celsius * 1.8) + 32 +``` +- Convert Fahrenheit <> Celsius: + - Celsius = (Fahrenheit - 32) / 1.8 + - Fahrenheit = (Celsius * 1.8) + 32 last updated: 4jul02 diff --git a/technology/websites/httpd.md b/technology/websites/httpd.md @@ -0,0 +1,6 @@ +# httpd + +- view modules loaded into server +``` +httpd -l +```