From c0d248d18c4d2a8921ef59377c26382abbffe8c3 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 16 Aug 2022 01:21:02 +0200 Subject: Update hugo framework --- about.html | 23 --- archetypes/default.md | 6 + blog.html | 25 --- config.toml | 3 + contact.html | 35 ---- content/_index.md | 28 +++ content/contact.md | 10 ++ content/cv.md | 137 +++++++++++++++ content/projects/keyboard.md | 6 + content/projects/openbsd.md | 6 + content/projects/text-recognizer.md | 7 + emailwiz.sh | 339 ------------------------------------ gustafgpg.gpg | 52 ------ images/git.png | Bin 2383 -> 0 bytes images/github.png | Bin 23729 -> 0 bytes images/gitlab.png | Bin 5468 -> 0 bytes images/landchad.gif | Bin 15127 -> 0 bytes images/no-clown-fiesta.png | Bin 226524 -> 0 bytes index.html | 29 --- layouts/_default/list.html | 11 ++ layouts/_default/rss.xml | 26 +++ layouts/_default/single.html | 5 + layouts/index.html | 5 + layouts/partials/footer.html | 10 ++ layouts/partials/header.html | 21 +++ layouts/partials/nav.html | 8 + layouts/partials/nextprev.html | 10 ++ layouts/partials/taglist.html | 13 ++ layouts/shortcodes/hidvid.html | 10 ++ layouts/shortcodes/img.html | 22 +++ layouts/shortcodes/tagcloud.html | 3 + layouts/shortcodes/vid.html | 6 + static/emailwiz.sh | 339 ++++++++++++++++++++++++++++++++++++ static/gustafgpg.gpg | 52 ++++++ static/images/git.png | Bin 0 -> 2383 bytes static/images/github.png | Bin 0 -> 23729 bytes static/images/gitlab.png | Bin 0 -> 5468 bytes static/images/landchad.gif | Bin 0 -> 15127 bytes static/images/no-clown-fiesta.png | Bin 0 -> 298973 bytes static/rss.svg | 1 + static/style.css | 98 +++++++++++ style.css | 86 --------- 42 files changed, 843 insertions(+), 589 deletions(-) delete mode 100644 about.html create mode 100644 archetypes/default.md delete mode 100644 blog.html create mode 100644 config.toml delete mode 100644 contact.html create mode 100644 content/_index.md create mode 100644 content/contact.md create mode 100644 content/cv.md create mode 100644 content/projects/keyboard.md create mode 100644 content/projects/openbsd.md create mode 100644 content/projects/text-recognizer.md delete mode 100755 emailwiz.sh delete mode 100644 gustafgpg.gpg delete mode 100644 images/git.png delete mode 100644 images/github.png delete mode 100644 images/gitlab.png delete mode 100644 images/landchad.gif delete mode 100644 images/no-clown-fiesta.png delete mode 100644 index.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/rss.xml create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/nav.html create mode 100644 layouts/partials/nextprev.html create mode 100644 layouts/partials/taglist.html create mode 100644 layouts/shortcodes/hidvid.html create mode 100644 layouts/shortcodes/img.html create mode 100644 layouts/shortcodes/tagcloud.html create mode 100644 layouts/shortcodes/vid.html create mode 100755 static/emailwiz.sh create mode 100644 static/gustafgpg.gpg create mode 100644 static/images/git.png create mode 100644 static/images/github.png create mode 100644 static/images/gitlab.png create mode 100644 static/images/landchad.gif create mode 100644 static/images/no-clown-fiesta.png create mode 100644 static/rss.svg create mode 100644 static/style.css delete mode 100644 style.css diff --git a/about.html b/about.html deleted file mode 100644 index da15df2..0000000 --- a/about.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - About Me – Gustaf Rydholm - - - - -
-

Gustaf Rydholm's Webpage

-
- -
-

I am an Electrical Engineer.

- - diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/blog.html b/blog.html deleted file mode 100644 index 1d4b155..0000000 --- a/blog.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Blog – Gustaf Rydholm - - - - -
-

Gustaf Rydholm's Webpage

-
- -
-
-

Hello, world!

-
- - diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..b79c28c --- /dev/null +++ b/config.toml @@ -0,0 +1,3 @@ +baseURL = "http://gustafrydholm.xyz/" +languageCode = "en-us" +title = "Gustaf Rydholm's Webpage" diff --git a/contact.html b/contact.html deleted file mode 100644 index 9fed617..0000000 --- a/contact.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - Contact Me – Gustaf Rydholm - - - - -
-

Contact Me

-
- -
-
-

Digital Contact Information

- -
- - diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..c8700e5 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,28 @@ +--- +title: "Gustaf Rydholm's Webpage" +description: "tbc" +--- + +## Introduction + +Hello, + +I am Gustaf Rydholm and welcome to my plot of cyber land. This website is a +work in progress, where I will post descriptions of some of my projects, maybe +book reviews/notes, cv, and digital contact information. + +### On this website... + +- [Projects](/projects) +- [Contact](/contact) +- [CV](/cv) + +## Software + +I manage my own git server for my own software projects: {{< img style="display:inline" width="5%" link="https://git.gustafrydholm.xyz" src="/images/git.png" >}} + +## Acknowledgment + +Luke Smith and his [websites](https://lukesmith.xyz/) has been a huge inspiration. + +{{< img style="display:inline" link="https://landchad.net" src="/images/landchad.gif" >}} diff --git a/content/contact.md b/content/contact.md new file mode 100644 index 0000000..3889a2b --- /dev/null +++ b/content/contact.md @@ -0,0 +1,10 @@ +--- +title: "Contact" +--- + +## Digital Contact Information + +- [gustaf@gustafrydholm.xyz](mailto:gustaf@gustafrydholm.xyz) +- All legitimate emails are signed with my gpg [key](/gustafgpg.gpg) + - `curl -sL https://gustafrydholm.xyz/gustafgpg.gpg | gpg --import` + - Fingerprint: `90BC 57ED D30F 1392 CD9F D367 2921 DF70 1EE0 3394` diff --git a/content/cv.md b/content/cv.md new file mode 100644 index 0000000..58a3dfd --- /dev/null +++ b/content/cv.md @@ -0,0 +1,137 @@ +--- +title: "CV" +--- + +### About me + +I like to tinker with computers/software, learning about good software architecture, and +mathematics. I am captivated by the beauty of functional programming and I am going +down the rabbit hole of learning some category theory for the sake of it. +My current long term goal is to finish developing/deploy my stock trading system. +In the mean time, I am looking for work where I can enhance my functional +programming skills and generate value for the shareholders of the company. + +### Technical Skills + +A short summery of some of my most relevant technical skills. + +#### Programming + +| Language | Level | +| -------- | ------------ | +| Haskell | Intermediate | +| Python | Fluent | +| Fennel | Fluent | +| Lua | Fluent | +| Shell | Fluent | +| Rust | Basic | +| VHDL | Basic | +| C | Superficial | + +#### Markup + +| Language | Level | +| -------- | ------------ | +| LaTeX | Fluent | +| markdown | Fluent | +| HTML | Proficient | + +#### Databases + +| Type | Implementation | +| ------------ | --------------------- | +| NoSQL | MongoDB | +| SQL | Postgres, TimescaleDB | +| Memory Cache | Redis | +| Message bus | Kafka, SQS, Nats | + +#### Software + +Here is a list some software that might be worth mentioning that I have +interacted with. + +| Name | Level | +| ---------- | ------------ | +| Git | Fluent | +| Kubernetes | Proficient | +| Helm | Proficient | +| Terraform | Intermediate | +| CircleCI | Proficient | +| Tekton | Proficient | +| Docker | Fluent | +| Neovim | Fluent | +| tmux | Proficient | +| neomutt | Proficient | + +I have plans on learning [Nomad](https://www.nomadproject.io), as this seems to +be a better copy of k8s. I am also moving to [podman](https://podman.io/) +next time I work with containers in my spare time. I am also keen working more +with service meshes, to improve my knowledge of their capabilities. + +#### Machine Learning + +tbc + +#### Operating Systems + +I use Artix Linux as my daily OS. However, I would like to transition to OpenBSD +soon. But, I am a bit afraid of the lack of support for Nvidia GPUs. +Unfortunately, I use macOS for work. + +#### Workflow + +I use neovim for all my development, together with dwm as a tiling +window manager, and st as the terminal of choice. I am very happy with this +setup, but would like to improve the workflow with increased tmux usage and +git worktrees, à la [ThePrimeagen](https://www.youtube.com/watch?v=GXxvxSlzJdI). +I use a ferris sweep keyboard with Colemak Mod-DH layout. I moved on from +qwerty as I do not believe that you should go through life using suboptimal +solutions from the past, just because you cannot bother learning something new. + +#### Architecture + +Good software is like physics, it should avoid too much complexity, like von +Neumann famously stated, *"With four parameters I can fit an elephant, and with +five I can make him wiggle his trunk"*. I adhere by the [unix +philosophy](http://www.catb.org/esr/writings/taoup/html/ch01s06.html), as well +as the [suckless philosophy](https://suckless.org/philosophy/). I truly believe +that you develop better software by following these principles. + +For designing and implementing distributed web service systems, I really like +the framework presented in the book *The Tao of Microservices*. Web services +should almost be provocatively small, most communication between services +should be asynchronous. You should at all cost avoid building a distributed +monolith with entangled dependencies. + +#### Miscellaneous + +| What | Level | +| --------- | ------------ | +| Soldering | Intermediate | + +### Experience + +- Nexure AB. + - Software Engineer. Aug 2021 -- Present + + I develop and maintain backend web services (microservices) in the + payments/subscription domain. From time to time I also do some + infrastructure work in k8s and AWS with terraform. + +- Saab AB. + - Machine Learning Engineer. Aug 2018 -- Aug 2021 + + blablabla + +### Institutions + +- M.Sc., Electrical Engineering. Kungliga Tekniska Högskolan. 2013 -- 2018 + - Major in Machine Learning + +- Exchange Year. Imperial College London. 2016 -- 2017 + +- Summer course in Chinese Culture and Language. Dalian University of Technology. 2014 + +- Economics I. Stockholms universitet. 2013 + +- Political Science I. Stockholms universitet. 2011 diff --git a/content/projects/keyboard.md b/content/projects/keyboard.md new file mode 100644 index 0000000..8e32734 --- /dev/null +++ b/content/projects/keyboard.md @@ -0,0 +1,6 @@ +--- +title: "Keyboard" +date: 2022-08-14T00:24:28+02:00 +draft: true +--- + diff --git a/content/projects/openbsd.md b/content/projects/openbsd.md new file mode 100644 index 0000000..354f066 --- /dev/null +++ b/content/projects/openbsd.md @@ -0,0 +1,6 @@ +--- +title: "Openbsd" +date: 2022-08-14T00:20:26+02:00 +draft: true +--- + diff --git a/content/projects/text-recognizer.md b/content/projects/text-recognizer.md new file mode 100644 index 0000000..8ec0c68 --- /dev/null +++ b/content/projects/text-recognizer.md @@ -0,0 +1,7 @@ +--- +title: "Text Recognizer" +date: 2022-08-13T23:56:43+02:00 +draft: false +--- + +tbc.. diff --git a/emailwiz.sh b/emailwiz.sh deleted file mode 100755 index 19bd57f..0000000 --- a/emailwiz.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/sh - -# THE SETUP - -# Mail will be stored in non-retarded Maildirs because it's $currentyear. This -# makes it easier for use with isync, which is what I care about so I can have -# an offline repo of mail. - -# The mailbox names are: Inbox, Sent, Drafts, Archive, Junk, Trash - -# Use the typical unix login system for mail users. Users will log into their -# email with their passnames on the server. No usage of a redundant mySQL -# database to do this. - -# DEPENDENCIES BEFORE RUNNING - -# 1. Have a Debian system with a static IP and all that. Pretty much any -# default VPS offered by a company will have all the basic stuff you need. This -# script might run on Ubuntu as well. Haven't tried it. If you have, tell me -# what happens. - -# 2. Have a Let's Encrypt SSL certificate for $maildomain. You might need one -# for $domain as well, but they're free with Let's Encypt so you should have -# them anyway. - -# 3. If you've been toying around with your server settings trying to get -# postfix/dovecot/etc. working before running this, I recommend you `apt purge` -# everything first because this script is build on top of only the defaults. -# Clear out /etc/postfix and /etc/dovecot yourself if needbe. - -# NOTE WHILE INSTALLING - -# On installation of Postfix, select "Internet Site" and put in TLD (without -# `mail.` before it). - -echo "Installing programs..." -pacman -S postfix dovecot opendkim spamassassin pigeonhole -# Check if OpenDKIM is installed and install it if not. -which opendkim-genkey >/dev/null 2>&1 || pacman -S opendkim-tools -[ -e /etc/mailname ] || echo "Could not find a mailname in /etc/" && exit 1 -domain="$(cat /etc/mailname)" -subdom=${MAIL_SUBDOM:-mail} -maildomain="$subdom.$domain" -certdir="/etc/letsencrypt/live/$maildomain" - -[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain\|*.$domain" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)")" - -[ ! -d "$certdir" ] && echo "Note! You must first have a Let's Encrypt Certbot HTTPS/SSL Certificate for $maildomain. - -Use Let's Encrypt's Certbot to get that and then rerun this script. - -You may need to set up a dummy $maildomain site in nginx or Apache for that to work." && exit 1 - -# NOTE ON POSTCONF COMMANDS - -# The `postconf` command literally just adds the line in question to -# /etc/postfix/main.cf so if you need to debug something, go there. It replaces -# any other line that sets the same setting, otherwise it is appended to the -# end of the file. - -echo "Configuring Postfix's main.cf..." - -# Change the cert/key files to the default locations of the Let's Encrypt cert/key -postconf -e "smtpd_tls_key_file=$certdir/privkey.pem" -postconf -e "smtpd_tls_cert_file=$certdir/fullchain.pem" -postconf -e "smtp_tls_CAfile=$certdir/cert.pem" - -# Enable, but do not require TLS. Requiring it with other server would cause -# mail delivery problems and requiring it locally would cause many other -# issues. -postconf -e "smtpd_tls_security_level = may" -postconf -e "smtp_tls_security_level = may" - -# TLS required for authentication. -postconf -e "smtpd_tls_auth_only = yes" - -# Exclude obsolete, insecure and obsolete encryption protocols. -postconf -e "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" -postconf -e "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" -postconf -e "smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" -postconf -e "smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" - -# Exclude suboptimal ciphers. -postconf -e "tls_preempt_cipherlist = yes" -postconf -e "smtpd_tls_exclude_ciphers = aNULL, LOW, EXP, MEDIUM, ADH, AECDH, MD5, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES, eNULL" - - -# Here we tell Postfix to look to Dovecot for authenticating users/passwords. -# Dovecot will be putting an authentication socket in /var/spool/postfix/private/auth -postconf -e "smtpd_sasl_auth_enable = yes" -postconf -e "smtpd_sasl_type = dovecot" -postconf -e "smtpd_sasl_path = private/auth" - -# Sender and recipient restrictions -postconf -e "smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination" - -# NOTE: the trailing slash here, or for any directory name in the home_mailbox -# command, is necessary as it distinguishes a maildir (which is the actual -# directories that what we want) from a spoolfile (which is what old unix -# boomers want and no one else). -postconf -e "home_mailbox = Mail/Inbox/" - -# master.cf -echo "Configuring Postfix's master.cf..." - -sed -i "/^\s*-o/d;/^\s*submission/d;/^\s*smtp/d" /etc/postfix/master.cf - -echo "smtp unix - - n - - smtp -smtp inet n - y - - smtpd - -o content_filter=spamassassin -submission inet n - y - - smtpd - -o syslog_name=postfix/submission - -o smtpd_tls_security_level=encrypt - -o smtpd_sasl_auth_enable=yes - -o smtpd_tls_auth_only=yes -smtps inet n - y - - smtpd - -o syslog_name=postfix/smtps - -o smtpd_tls_wrappermode=yes - -o smtpd_sasl_auth_enable=yes -spamassassin unix - n n - - pipe - user=spamd argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi -f \${sender} \${recipient}" >> /etc/postfix/master.cf - - -# By default, dovecot has a bunch of configs in /etc/dovecot/conf.d/ These -# files have nice documentation if you want to read it, but it's a huge pain to -# go through them to organize. Instead, we simply overwrite -# /etc/dovecot/dovecot.conf because it's easier to manage. You can get a backup -# of the original in /usr/share/dovecot if you want. - -[ -d "/etc/dovecot" ] || mkdir /etc/dovecot -cp /usr/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/dovecot.conf -cp -r /usr/share/doc/dovecot/example-config/conf.d /etc/dovecot -mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.backup.conf - -echo "Creating Dovecot config..." - -openssl dhparam -out /etc/dovecot/dh.pem 4096 - -echo "# Dovecot config -# Note that in the dovecot conf, you can use: -# %u for username -# %n for the name in name@domain.tld -# %d for the domain -# %h the user's home directory - -# If you're not a brainlet, SSL must be set to required. -ssl = required -ssl_cert = <$certdir/fullchain.pem -ssl_key = <$certdir/privkey.pem -ssl_min_protocol = TLSv1.2 -ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED -ssl_prefer_server_ciphers = yes -ssl_dh = /etc/dovecot/dovecot.conf - -# If using an old version of Dovecot, remove the ssl_dl line. -case "$(dovecot --version)" in - 1|2.1*|2.2*) sed -i "/^ssl_dh/d" /etc/dovecot/dovecot.conf ;; -esac - -mkdir -p /var/lib/dovecot/sieve/ - -echo "require [\"fileinto\", \"mailbox\"]; -if header :contains \"X-Spam-Flag\" \"YES\" - { - fileinto \"Junk\"; - }" > /var/lib/dovecot/sieve/default.sieve - -grep -q "^vmail:" /etc/passwd || useradd vmail -chown -R vmail:vmail /var/lib/dovecot -sievec /var/lib/dovecot/sieve/default.sieve - -echo "Preparing user authentication..." -grep -q nullok /etc/pam.d/dovecot || -echo "auth required pam_unix.so nullok -account required pam_unix.so" >> /etc/pam.d/dovecot - -# OpenDKIM - -# A lot of the big name email services, like Google, will automatically reject -# as spam unfamiliar and unauthenticated email addresses. As in, the server -# will flatly reject the email, not even delivering it to someone's Spam -# folder. - -# OpenDKIM is a way to authenticate your email so you can send to such services -# without a problem. - -# Create an OpenDKIM key in the proper place with proper permissions. -echo "Generating OpenDKIM keys..." -mkdir -p /etc/postfix/dkim -opendkim-genkey -D /etc/postfix/dkim/ -d "$domain" -s "$subdom" -chmod g+r /etc/postfix/dkim/* - -# Generate the OpenDKIM info: -echo "Configuring OpenDKIM..." -cp /usr/share/doc/opendkim/opendkim.conf.sample /etc/opendkim/opendkim.conf -grep -q "$domain" /etc/postfix/dkim/keytable 2>/dev/null || -echo "$subdom._domainkey.$domain $domain:$subdom:/etc/postfix/dkim/$subdom.private" >> /etc/postfix/dkim/keytable - -grep -q "$domain" /etc/postfix/dkim/signingtable 2>/dev/null || -echo "*@$domain $subdom._domainkey.$domain" >> /etc/postfix/dkim/signingtable - -grep -q "127.0.0.1" /etc/postfix/dkim/trustedhosts 2>/dev/null || - echo "127.0.0.1 -10.1.0.0/16 -1.2.3.4/24" >> /etc/postfix/dkim/trustedhosts - -# ...and source it from opendkim.conf -grep -q "^KeyTable" /etc/opendkim/opendkim.conf 2>/dev/null || echo "KeyTable file:/etc/postfix/dkim/keytable -SigningTable refile:/etc/postfix/dkim/signingtable -InternalHosts refile:/etc/postfix/dkim/trustedhosts" >> /etc/opendkim/opendkim.conf - -sed -i '/^#Canonicalization/s/simple/relaxed\/simple/' /etc/opendkim/opendkim.conf -sed -i '/^#Canonicalization/s/^#//' /etc/opendkim/opendkim.conf - -sed -i '/Socket/s/^#*/#/' /etc/opendkim/opendkim.conf -grep -q "^Socket\s*inet:12301@localhost" /etc/opendkim/opendkim.conf || echo "Socket inet:12301@localhost" >> /etc/opendkim/opendkim.conf - -# Here we add to postconf the needed settings for working with OpenDKIM -echo "Configuring Postfix with OpenDKIM settings..." -postconf -e "smtpd_sasl_security_options = noanonymous, noplaintext" -postconf -e "smtpd_sasl_tls_security_options = noanonymous" -postconf -e "myhostname = $domain" -postconf -e "milter_default_action = accept" -postconf -e "milter_protocol = 6" -postconf -e "smtpd_milters = inet:127.0.0.1:12301" -postconf -e "non_smtpd_milters = inet:127.0.0.1:12301" -postconf -e "mailbox_command = /usr/lib/dovecot/deliver" - -systemctl daemon-reload - -for x in spamassassin opendkim dovecot postfix; do - printf "Restarting %s..." "$x" - systemctl enable --now "$x" && printf " ...done\\n" -done - -# If ufw is used, enable the mail ports. -ufw status | grep -qw active && { ufw allow 993; ufw allow 465 ; ufw allow 587; ufw allow 25 ;} - -pval="$(tr -d "\n" "$HOME/dns_emailwizard" - -printf "\033[31m - _ _ -| \ | | _____ ___ -| \| |/ _ \ \ /\ / (_) -| |\ | (_) \ V V / _ -|_| \_|\___/ \_/\_/ (_)\033[0m - -Add these three records to your DNS TXT records on either your registrar's site -or your DNS server: -\033[32m -$dkimentry - -$dmarcentry - -$spfentry -\033[0m -NOTE: You may need to omit the \`.$domain\` portion at the beginning if -inputting them in a registrar's web interface. - -Also, these are now saved to \033[34m~/dns_emailwizard\033[0m in case you want them in a file. - -Once you do that, you're done! Check the README for how to add users/accounts -and how to log in." diff --git a/gustafgpg.gpg b/gustafgpg.gpg deleted file mode 100644 index 9352534..0000000 --- a/gustafgpg.gpg +++ /d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kC7gbCFnIRbxU7lkVZ3zY0CPPOAn1q5Q39XGUjJnUYeNSPdcv7j8F -gAd1S5nUEcwgslBwWiEAaOmADhDVkB8Y53REVfpoVt1IPfOENMp6EIMXX9tijasF -M8qiolcrc03yCZozO8v14LLvdG5YfpsEPh9KvaLYP6hGpbKYUzmMep7K9zUpzCc9 -DVoNxj6WgxViCwARAQABiQI2BBgBCAAgFiEEkLxX7dMPE5LNn9NnKSHfcB7gM5QF -AmHDc8UCGwwACgkQKSHfcB7gM5RqWQ//QiQxdluuBAondfIzFRMhBIx/d05qkUWn -UeaGjbdzKVmbq9NQkklh3CefBXMuQc1El2rMY3tWJPVNaAyJNAwQSDAwTdfR45aD -LdlM7hrP+kPu2kT+EAgXVs/463ZBiQeIMUj7OBLwufJnntsNwpFHEyXFsVloJCq5 -8CgMpam901VhALoQBKIgm/hjb9YFTON1JI/vkfDLJQw5uxN4JKKgVO+O8uLTUKJV -eVVyvp7lwb3r3GSY0fkEH1RHs6xIxo75VfDGov1Y48JheA5YXQx8Ic0IDKkQjECy -bgqW34OVVKCUj8WtOE61dsRQa2tyHUf/egN3tYfoPDttWJQfrJZMlOI0DfmCkO+O -zMNZAlqrjvEGioWS3L9RNphfh3x/4vNbmdfzaSBU2TEZknR58sTQQu2Hci218u+g -GFlRxwPVZiirCZJ/7Efm4u0xlJRMEUAELiSvCozug6yWhf788yRb1ZxcCbOuwNFN -P4aYHKrPFXdJn4NCb9oSFkuBvLzqT/xUqdkoZLv3uJqO8Ik9iuDz2KksHI2uZXyj -RGSRLYmV//aIz5m5DOtwvn1TJOMfOOZA/ii0Q6Oi49Dy16uWLcL8dRHsABJUJcX+ -e7EBHUIC122qWQ6TRKRogrCze8MTDNUJ35G6xF8WCUz1bemHGqZH6QO7Yy8SkP32 -qRMN8HvqPWw= -=ciZM ------END PGP PUBLIC KEY BLOCK----- diff --git a/images/git.png b/images/git.png deleted file mode 100644 index 51f4ae5..0000000 Binary files a/images/git.png and /dev/null differ diff --git a/images/github.png b/images/github.png deleted file mode 100644 index d5dacf8..0000000 Binary files a/images/github.png and /dev/null differ diff --git a/images/gitlab.png b/images/gitlab.png deleted file mode 100644 index 1e8f7ad..0000000 Binary files a/images/gitlab.png and /dev/null differ diff --git a/images/landchad.gif b/images/landchad.gif deleted file mode 100644 index 302cd26..0000000 Binary files a/images/landchad.gif and /dev/null differ diff --git a/images/no-clown-fiesta.png b/images/no-clown-fiesta.png deleted file mode 100644 index f611ce6..0000000 Binary files a/images/no-clown-fiesta.png and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 7dc5641..0000000 --- a/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - Gustaf Rydholm's Webpage - - - - -
-

Gustaf Rydholm's Webpage

-
- -
-
-

Hello, world!

-

Various software and scripts I maintain and develop (replication x3):

-
  • Private Git Server
  • GitHub
  • GitLab
  • -

    TBC...

    -
    LandChad.net
    -
    - - diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..b6a63be --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ partial "header.html" . -}} +

    {{ .Title | title }}

    +
    +{{ .Content -}} + +
    +{{- partial "footer.html" . }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..9269333 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,26 @@ + + + {{ .Site.Title }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{- .Content | html -}} + + {{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..43e8c2a --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . -}} +

    {{ .Title }}

    +
    +{{ .Content -}} +{{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..43e8c2a --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . -}} +

    {{ .Title }}

    +
    +{{ .Content -}} +{{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..3d1282e --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + + +
    + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..f304fde --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,21 @@ + + + + {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }} + + + + {{ with .Site.Params.favicon }} + {{ end -}} + + {{ if isset .Params "tags" }} + {{ end -}} + + + + + +{{- if .Site.Menus.main }} +{{ partial "nav.html" . }} +{{ end }} +
    diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..a7318fe --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,8 @@ + diff --git a/layouts/partials/nextprev.html b/layouts/partials/nextprev.html new file mode 100644 index 0000000..099f16d --- /dev/null +++ b/layouts/partials/nextprev.html @@ -0,0 +1,10 @@ +{{ if or .Next .Prev -}} +
    +{{- with .Prev }} +
    Previous:
    {{.Title}}
    +{{ end -}} +{{- with .Next -}} +
    Next:
    {{.Title}}
    +{{ end -}} +
    +{{ end -}} diff --git a/layouts/partials/taglist.html b/layouts/partials/taglist.html new file mode 100644 index 0000000..757db6f --- /dev/null +++ b/layouts/partials/taglist.html @@ -0,0 +1,13 @@ + {{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}} +
    + {{- with .Site.Params.relatedtext }}{{ . }}
    {{ end -}} + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} +
    + {{- end -}} + {{- end }} diff --git a/layouts/shortcodes/hidvid.html b/layouts/shortcodes/hidvid.html new file mode 100644 index 0000000..14f592d --- /dev/null +++ b/layouts/shortcodes/hidvid.html @@ -0,0 +1,10 @@ +
    + Click to reveal video. + +
    diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 0000000..2df4ff6 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,22 @@ + +
    + {{- with .Get "link"}}{{ end -}} + {{.}} + {{- if .Get "link"}}{{ end -}} + {{- with .Get "caption" -}} +
    + {{- . -}} +
    + {{- end -}} +
    diff --git a/layouts/shortcodes/tagcloud.html b/layouts/shortcodes/tagcloud.html new file mode 100644 index 0000000..0cf0118 --- /dev/null +++ b/layouts/shortcodes/tagcloud.html @@ -0,0 +1,3 @@ +{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
      + {{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}
    • {{ $name | title }}
    • + {{ end }}
    {{ end }}{{ end }} diff --git a/layouts/shortcodes/vid.html b/layouts/shortcodes/vid.html new file mode 100644 index 0000000..4c612fe --- /dev/null +++ b/layouts/shortcodes/vid.html @@ -0,0 +1,6 @@ + diff --git a/static/emailwiz.sh b/static/emailwiz.sh new file mode 100755 index 0000000..19bd57f --- /dev/null +++ b/static/emailwiz.sh @@ -0,0 +1,339 @@ +#!/bin/sh + +# THE SETUP + +# Mail will be stored in non-retarded Maildirs because it's $currentyear. This +# makes it easier for use with isync, which is what I care about so I can have +# an offline repo of mail. + +# The mailbox names are: Inbox, Sent, Drafts, Archive, Junk, Trash + +# Use the typical unix login system for mail users. Users will log into their +# email with their passnames on the server. No usage of a redundant mySQL +# database to do this. + +# DEPENDENCIES BEFORE RUNNING + +# 1. Have a Debian system with a static IP and all that. Pretty much any +# default VPS offered by a company will have all the basic stuff you need. This +# script might run on Ubuntu as well. Haven't tried it. If you have, tell me +# what happens. + +# 2. Have a Let's Encrypt SSL certificate for $maildomain. You might need one +# for $domain as well, but they're free with Let's Encypt so you should have +# them anyway. + +# 3. If you've been toying around with your server settings trying to get +# postfix/dovecot/etc. working before running this, I recommend you `apt purge` +# everything first because this script is build on top of only the defaults. +# Clear out /etc/postfix and /etc/dovecot yourself if needbe. + +# NOTE WHILE INSTALLING + +# On installation of Postfix, select "Internet Site" and put in TLD (without +# `mail.` before it). + +echo "Installing programs..." +pacman -S postfix dovecot opendkim spamassassin pigeonhole +# Check if OpenDKIM is installed and install it if not. +which opendkim-genkey >/dev/null 2>&1 || pacman -S opendkim-tools +[ -e /etc/mailname ] || echo "Could not find a mailname in /etc/" && exit 1 +domain="$(cat /etc/mailname)" +subdom=${MAIL_SUBDOM:-mail} +maildomain="$subdom.$domain" +certdir="/etc/letsencrypt/live/$maildomain" + +[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain\|*.$domain" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)")" + +[ ! -d "$certdir" ] && echo "Note! You must first have a Let's Encrypt Certbot HTTPS/SSL Certificate for $maildomain. + +Use Let's Encrypt's Certbot to get that and then rerun this script. + +You may need to set up a dummy $maildomain site in nginx or Apache for that to work." && exit 1 + +# NOTE ON POSTCONF COMMANDS + +# The `postconf` command literally just adds the line in question to +# /etc/postfix/main.cf so if you need to debug something, go there. It replaces +# any other line that sets the same setting, otherwise it is appended to the +# end of the file. + +echo "Configuring Postfix's main.cf..." + +# Change the cert/key files to the default locations of the Let's Encrypt cert/key +postconf -e "smtpd_tls_key_file=$certdir/privkey.pem" +postconf -e "smtpd_tls_cert_file=$certdir/fullchain.pem" +postconf -e "smtp_tls_CAfile=$certdir/cert.pem" + +# Enable, but do not require TLS. Requiring it with other server would cause +# mail delivery problems and requiring it locally would cause many other +# issues. +postconf -e "smtpd_tls_security_level = may" +postconf -e "smtp_tls_security_level = may" + +# TLS required for authentication. +postconf -e "smtpd_tls_auth_only = yes" + +# Exclude obsolete, insecure and obsolete encryption protocols. +postconf -e "smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" +postconf -e "smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" +postconf -e "smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" +postconf -e "smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1" + +# Exclude suboptimal ciphers. +postconf -e "tls_preempt_cipherlist = yes" +postconf -e "smtpd_tls_exclude_ciphers = aNULL, LOW, EXP, MEDIUM, ADH, AECDH, MD5, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES, eNULL" + + +# Here we tell Postfix to look to Dovecot for authenticating users/passwords. +# Dovecot will be putting an authentication socket in /var/spool/postfix/private/auth +postconf -e "smtpd_sasl_auth_enable = yes" +postconf -e "smtpd_sasl_type = dovecot" +postconf -e "smtpd_sasl_path = private/auth" + +# Sender and recipient restrictions +postconf -e "smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination" + +# NOTE: the trailing slash here, or for any directory name in the home_mailbox +# command, is necessary as it distinguishes a maildir (which is the actual +# directories that what we want) from a spoolfile (which is what old unix +# boomers want and no one else). +postconf -e "home_mailbox = Mail/Inbox/" + +# master.cf +echo "Configuring Postfix's master.cf..." + +sed -i "/^\s*-o/d;/^\s*submission/d;/^\s*smtp/d" /etc/postfix/master.cf + +echo "smtp unix - - n - - smtp +smtp inet n - y - - smtpd + -o content_filter=spamassassin +submission inet n - y - - smtpd + -o syslog_name=postfix/submission + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes + -o smtpd_tls_auth_only=yes +smtps inet n - y - - smtpd + -o syslog_name=postfix/smtps + -o smtpd_tls_wrappermode=yes + -o smtpd_sasl_auth_enable=yes +spamassassin unix - n n - - pipe + user=spamd argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi -f \${sender} \${recipient}" >> /etc/postfix/master.cf + + +# By default, dovecot has a bunch of configs in /etc/dovecot/conf.d/ These +# files have nice documentation if you want to read it, but it's a huge pain to +# go through them to organize. Instead, we simply overwrite +# /etc/dovecot/dovecot.conf because it's easier to manage. You can get a backup +# of the original in /usr/share/dovecot if you want. + +[ -d "/etc/dovecot" ] || mkdir /etc/dovecot +cp /usr/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/dovecot.conf +cp -r /usr/share/doc/dovecot/example-config/conf.d /etc/dovecot +mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.backup.conf + +echo "Creating Dovecot config..." + +openssl dhparam -out /etc/dovecot/dh.pem 4096 + +echo "# Dovecot config +# Note that in the dovecot conf, you can use: +# %u for username +# %n for the name in name@domain.tld +# %d for the domain +# %h the user's home directory + +# If you're not a brainlet, SSL must be set to required. +ssl = required +ssl_cert = <$certdir/fullchain.pem +ssl_key = <$certdir/privkey.pem +ssl_min_protocol = TLSv1.2 +ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED +ssl_prefer_server_ciphers = yes +ssl_dh = /etc/dovecot/dovecot.conf + +# If using an old version of Dovecot, remove the ssl_dl line. +case "$(dovecot --version)" in + 1|2.1*|2.2*) sed -i "/^ssl_dh/d" /etc/dovecot/dovecot.conf ;; +esac + +mkdir -p /var/lib/dovecot/sieve/ + +echo "require [\"fileinto\", \"mailbox\"]; +if header :contains \"X-Spam-Flag\" \"YES\" + { + fileinto \"Junk\"; + }" > /var/lib/dovecot/sieve/default.sieve + +grep -q "^vmail:" /etc/passwd || useradd vmail +chown -R vmail:vmail /var/lib/dovecot +sievec /var/lib/dovecot/sieve/default.sieve + +echo "Preparing user authentication..." +grep -q nullok /etc/pam.d/dovecot || +echo "auth required pam_unix.so nullok +account required pam_unix.so" >> /etc/pam.d/dovecot + +# OpenDKIM + +# A lot of the big name email services, like Google, will automatically reject +# as spam unfamiliar and unauthenticated email addresses. As in, the server +# will flatly reject the email, not even delivering it to someone's Spam +# folder. + +# OpenDKIM is a way to authenticate your email so you can send to such services +# without a problem. + +# Create an OpenDKIM key in the proper place with proper permissions. +echo "Generating OpenDKIM keys..." +mkdir -p /etc/postfix/dkim +opendkim-genkey -D /etc/postfix/dkim/ -d "$domain" -s "$subdom" +chmod g+r /etc/postfix/dkim/* + +# Generate the OpenDKIM info: +echo "Configuring OpenDKIM..." +cp /usr/share/doc/opendkim/opendkim.conf.sample /etc/opendkim/opendkim.conf +grep -q "$domain" /etc/postfix/dkim/keytable 2>/dev/null || +echo "$subdom._domainkey.$domain $domain:$subdom:/etc/postfix/dkim/$subdom.private" >> /etc/postfix/dkim/keytable + +grep -q "$domain" /etc/postfix/dkim/signingtable 2>/dev/null || +echo "*@$domain $subdom._domainkey.$domain" >> /etc/postfix/dkim/signingtable + +grep -q "127.0.0.1" /etc/postfix/dkim/trustedhosts 2>/dev/null || + echo "127.0.0.1 +10.1.0.0/16 +1.2.3.4/24" >> /etc/postfix/dkim/trustedhosts + +# ...and source it from opendkim.conf +grep -q "^KeyTable" /etc/opendkim/opendkim.conf 2>/dev/null || echo "KeyTable file:/etc/postfix/dkim/keytable +SigningTable refile:/etc/postfix/dkim/signingtable +InternalHosts refile:/etc/postfix/dkim/trustedhosts" >> /etc/opendkim/opendkim.conf + +sed -i '/^#Canonicalization/s/simple/relaxed\/simple/' /etc/opendkim/opendkim.conf +sed -i '/^#Canonicalization/s/^#//' /etc/opendkim/opendkim.conf + +sed -i '/Socket/s/^#*/#/' /etc/opendkim/opendkim.conf +grep -q "^Socket\s*inet:12301@localhost" /etc/opendkim/opendkim.conf || echo "Socket inet:12301@localhost" >> /etc/opendkim/opendkim.conf + +# Here we add to postconf the needed settings for working with OpenDKIM +echo "Configuring Postfix with OpenDKIM settings..." +postconf -e "smtpd_sasl_security_options = noanonymous, noplaintext" +postconf -e "smtpd_sasl_tls_security_options = noanonymous" +postconf -e "myhostname = $domain" +postconf -e "milter_default_action = accept" +postconf -e "milter_protocol = 6" +postconf -e "smtpd_milters = inet:127.0.0.1:12301" +postconf -e "non_smtpd_milters = inet:127.0.0.1:12301" +postconf -e "mailbox_command = /usr/lib/dovecot/deliver" + +systemctl daemon-reload + +for x in spamassassin opendkim dovecot postfix; do + printf "Restarting %s..." "$x" + systemctl enable --now "$x" && printf " ...done\\n" +done + +# If ufw is used, enable the mail ports. +ufw status | grep -qw active && { ufw allow 993; ufw allow 465 ; ufw allow 587; ufw allow 25 ;} + +pval="$(tr -d "\n" "$HOME/dns_emailwizard" + +printf "\033[31m + _ _ +| \ | | _____ ___ +| \| |/ _ \ \ /\ / (_) +| |\ | (_) \ V V / _ +|_| \_|\___/ \_/\_/ (_)\033[0m + +Add these three records to your DNS TXT records on either your registrar's site +or your DNS server: +\033[32m +$dkimentry + +$dmarcentry + +$spfentry +\033[0m +NOTE: You may need to omit the \`.$domain\` portion at the beginning if +inputting them in a registrar's web interface. + +Also, these are now saved to \033[34m~/dns_emailwizard\033[0m in case you want them in a file. + +Once you do that, you're done! Check the README for how to add users/accounts +and how to log in." diff --git a/static/gustafgpg.gpg b/static/gustafgpg.gpg new file mode 100644 index 0000000..9352534 --- /dev/null +++ b/static/gustafgpg.gpg @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGHDc8UBEADHJYQmBPaVLmMAM7SNQX3k6Hay3bjujUy6L1dqWfLSvFfb3vc9 +Nq/ifGhjc1xJZTbRt7tIlDEPFMBjA+WXLvlml9ZkJ0mWFzMrXlR92kqILd9bG+G6 +rK+9UPXU6AKnwo3/zdZa6seFuL1v76jWlQuG1NgSV2kuI6r532bXmTY2L7gX+GEN +588uP8VJkN8MhPixHcNCp5xr0qpa18uKEOrVl7bt+BComNDEHyzoaKAIkFscoxqX +uHrAivoxf0h4b3c2O3h22m9jJFOCVIdlJjWDDHBcOYMzK4ACKYktoLrJoUJ1J41v +VQR1SXJ55H95mUlN4o8KwkYLOTO5K2Xbf4p2P6O0Ksz7rVPpZ2mCOQyMGJPs5tJZ +GoPLhTcaQM0sOiae0dluz/BjAB5tvjqP59eI5VTr7wictTh6onvFlL916Au6E3bo +bH34Vm7GQUNbfLWa+M6C3ywTg+J/jYeHYkzbU2q7qvu19f57e4OxxI2VdbQv5gBx +fCZhXOB/JgLNJ4M2LTHv/ja5bDu1WWBBa+pkKt0LYiOKFezcRKvA50Z7RYqB57Yj +l0rNW0gJecqljV2keCuHSUOzFTdsoooWSkoLK1aofune30zSA5kLEx1zfzJdE0x9 +7Scq1M0YfhVoyjcRc/fuAR543n2eT6WqPAJ28Rii5tRufB/BExSWNLAUKwARAQAB +tClHdXN0YWYgUnlkaG9sbSA8Z3VzdGFmLnJ5ZGhvbG1AZ21haWwuY29tPokCUQQT +AQgAOwIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBJC8V+3TDxOSzZ/TZykh +33Ae4DOUBQJhw3vL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ogrCze8MTDNUJ35G6xF8WCUz1bemHGqZH6QO7Yy8SkP32 +qRMN8HvqPWw= +=ciZM +-----END PGP PUBLIC KEY BLOCK----- diff --git a/static/images/git.png b/static/images/git.png new file mode 100644 index 0000000..51f4ae5 Binary files /dev/null and b/static/images/git.png differ diff --git a/static/images/github.png b/static/images/github.png new file mode 100644 index 0000000..d5dacf8 Binary files /dev/null and b/static/images/github.png differ diff --git a/static/images/gitlab.png b/static/images/gitlab.png new file mode 100644 index 0000000..1e8f7ad Binary files /dev/null and b/static/images/gitlab.png differ diff --git a/static/images/landchad.gif b/static/images/landchad.gif new file mode 100644 index 0000000..302cd26 Binary files /dev/null and b/static/images/landchad.gif differ diff --git a/static/images/no-clown-fiesta.png b/static/images/no-clown-fiesta.png new file mode 100644 index 0000000..8f32f4e Binary files /dev/null and b/static/images/no-clown-fiesta.png differ diff --git a/static/rss.svg b/static/rss.svg new file mode 100644 index 0000000..dfda038 --- /dev/null +++ b/static/rss.svg @@ -0,0 +1 @@ + diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..df4b7ed --- /dev/null +++ b/static/style.css @@ -0,0 +1,98 @@ +body { + background: #033 ; + color: brown ; + max-width: 850px ; + margin: auto ; + padding: 0 16px ; + margin-bottom: 500px ; + scrollbar-color: gray #151515; + font-family: sans-serif ; +} + +main { + max-width: 800px ; + margin: auto ; +} + +main > article { + background: #88afa2 ; + color: #151515 ; + margin-bottom: 0 ; + padding: 3.5em ; + border-color: #1e4e76 ; + border-width: 0.25em 0.25em 0.25em .25em ; + border-style: solid ; + text-align: justify; + border-radius: 0 ; + margin: auto ; +} + +img { + max-width: 100% ; +} + +header h1 { + text-align: center ; + text-shadow: 3px 0 black, 3px 3px black, 0 3px black; +} + +h1 { + border-style: solid ; + border-width: 0px 0px 2px 0px ; + text-align: center ; +} + +h2 { + color: #151515 ; + text-align: center ; +} + +footer { + max-width: 300px ; + background: #88afa2 ; + margin-left: auto ; + margin-right: auto ; + margin-top: -4px ; + text-align: center ; + clear: both ; + border-color: #1e4e76 ; + border-width: 0em 0.25em 0.25em 0.25em ; + border-style: solid ; + border-radius: 0 0 0 0 ; +} + +code { + color: #373737 ; + overflow-wrap: break-word ; + font-size: 10pt ; +} + +/* For TAGLIST.HTML */ +.taglist { + text-align: center ; + clear: both ; +} + +/* For NEXTPREV.HTML */ +#nextprev { + /* The container for both the previous and next articles. */ +} + +#prevart { + float: left ; + text-align: left ; +} + +#nextart { + float: right ; + text-align: right ; +} + +#nextart,#prevart { + max-width: 33% ; +} + +table, th, td { + width: 400px ; + border: 1px solid; +} diff --git a/style.css b/style.css deleted file mode 100644 index 1d1bfc7..0000000 --- a/style.css +++ /dev/null @@ -1,86 +0,0 @@ -body { - text-align: justify; - font-style: sans-serif ; - max-width: 600px ; - margin-left: auto ; - margin-right: auto ; -} - -h1 { - text-align: center ; -} - -ul, ol { - margin-left: 20px; - margin-right: 20px; - padding-left: 0; -} - -ul ul { - list-style-type: circle; - margin-block-start: 0px; - margin-block-end: 0px; -} - -main { - margin: auto ; -} - -p img, li img, h1 img, h2 img, h3 img, h4 img, dt img { - vertical-align: middle ; - max-width: 1em; - max-height: 1em; - border: none ; - display: inline ; -} - -a { - color: blue ; - text-decoration: none ; -} - -dl { - display: inline-flex; - text-align: center; -} - -footer { - text-align: center ; - font-variant: small-caps ; - clear: both ; - padding: 2em 0 ; -} - -footer li { - display: inline-block ; - padding: 0.5em ; - font-size: x-large ; -} - -nav, footer, .tag-list{ - text-align: center; - font-variant: small-caps; - clear: both; -} - -nav { - font-size: small; -} - -nav ul, footer ul, .tag-list { - padding: 0; -} - -nav li, footer li, .tag-list li{ - color: blue; - display: inline-block; - list-style: none; - border-radius: 10px; - padding: .5em; - max-width: 7em; -} - -code { - border-radius: 5px ; - overflow-wrap: break-word ; -} -- cgit v1.2.3-70-g09d2