Browse Source

initial commit

master
Vincent Truchseß 3 months ago
commit
16441d3f84

+ 4
- 0
.gitignore View File

@@ -0,0 +1,4 @@
_cache/*
_site/*
.stack-work
drafts

+ 26
- 0
about.md View File

@@ -0,0 +1,26 @@
---
title: About me
---

# Who am I?

I am a 30Yo Nerd, Dad and technically still enrolled for Computer Science at my local
University. Usually I am concerned with computer-networks, operating servers and
having fun in my day-to-day computing.
Apart from operations, I do have quite an interest in functional programming
(mostly Haskell and LISP), Documantation and Decentralized Software.

# What do I do?

Whilst being a Student I do work for my University, maintaining our
linux-computerpools. Apart from that I was operating linux-servers over the
course of the last 8 years.
At the moment I am taking a bit of time for myself, starting to write down some
of my experience as an operator and linux-user.

# Blogs / Podcasts

The blogs I read regularly can be found [here](files/feeds.opml).

A collection of (mostly german) podcasts I usually listen to can be found
[here](files/podcasts.opml).

+ 11
- 0
blog.cabal View File

@@ -0,0 +1,11 @@
name: blog
version: 0.1.0.0
build-type: Simple
cabal-version: >= 1.10

executable site
main-is: site.hs
build-depends: base == 4.*
, hakyll == 4.12.*
ghc-options: -threaded
default-language: Haskell2010

+ 33
- 0
contact.md View File

@@ -0,0 +1,33 @@
---
title: Contact / Impress
---

# How to contact me

If you want to give me feedback on my blog or something similar, there ars
serveral ways to get in touch with me.

xmpp: vi@xmpp.fyber.space
fediverse: [\@vi\@social.fyber.space](https://social.fyber.space/vi)
ssb: ```@enYnrAbM4s4BVadGY7VC0suQ48QitTkE4PlQYTtNT+4=.ed25519```

## Feedback / Comments

If you like to comment on one of my posts and you have a fediverse-account, just
reply to the right post made by
[\@blog\@social.fyber.space](https://social.fyber.space/blog). There is also a
direct link at the bottom of every blogpost.

## Gossip

If you like to talk gossip, there is a gossip-MUC I am reguarly hangin out:
gossip@muc.fyber.space

# Impress

***This website is exclusively run for private and noncommercial purposes.***

Vincent Truchseß
Rechenzentrum
Am Hubland
97074 Würzburg

+ 186
- 0
css/default.css View File

@@ -0,0 +1,186 @@
html {
font-size: 62.5%;
}

body {
font-size: 1.6rem;
color: #000;
background-color: #fff;
}

header {
border-bottom: 0.3rem solid #000;
min-height: 56px;
line-height: 56px;
}

nav {
text-align: right;
}

nav a {
font-size: 1.8rem;
font-weight: bold;
color: black;
text-decoration: none;
text-transform: uppercase;
}

main {
margin-bottom: 16px;
padding-bottom: 16px;
height: 100%;
}

footer {
margin-top: 3rem;
padding: 1.2rem 0;
border-top: 0.2rem solid #000;
font-size: 1.2rem;
color: #555;
bottom: 0;
height: 16px;
line-height: 16px;
background-color: #fff;
}

p {
margin-top: 1rem;
}

h1 {
font-size: 2.4rem;
}

h2 {
font-size: 2rem;
}

h3{
margin-bottom: 0px;
margin-top: 2rem;
}

pre {
background-color:#dedfe9;
border-radius:8px;
padding: 8px;
}
div.pre {
background-color:#dedfe9;
border-radius:8px;
padding: 8px;
}

article .header {
font-size: 1.4rem;
font-style: italic;
color: #555;
}

.logo a {
font-weight: bold;
color: #000;
text-decoration: none;
}

@media (max-width: 319px) {
body {
width: 90%;
margin: 0;
padding: 0 5%;
}
header {
margin: 4.2rem 0;
}
nav {
margin: 0 auto 3rem;
text-align: center;
}
footer {
text-align: center;
}
.logo {
text-align: center;
margin: 1rem auto 3rem;
}
.logo a {
font-size: 2.4rem;
}
nav a {
display: block;
line-height: 1.6;
}
}

@media (min-width: 320px) {
body {
width: 90%;
margin: 8px;
padding: 0 5%;
}
header {
margin: 4.2rem 0;
}
nav {
margin: 0 auto 3rem;
text-align: center;
}
footer {
text-align: center;
}
.logo {
text-align: center;
margin: 1rem auto 3rem;
}
.logo a {
font-size: 2.4rem;
}
nav a {
display: inline;
margin: 0 0.6rem;
}
}

@media (min-width: 860px) {
body {
width: 75%;
max-width: 110rem;
margin: 0 auto;
padding-top: 100px;
padding-bottom: 16px;
}
header {
position: fixed;
width: inherit;
max-width: inherit;
background-color: inherit;
margin: 0 0 3rem;
padding-top: 12px;
padding-bottom: 2px;
top: 0;
}
nav {
margin: 0;
text-align: right;
}
nav a {
margin: 0 0 0 1.2rem;
display: inline;
}
footer {
text-align: right;
position: fixed;
bottom: 0;
width: inherit;
max-width: inherit;
}
.logo {
margin: 0;
text-align: left;
}
.logo a {
float: left;
font-size: 1.8rem;
}
}

BIN
favicon.png View File


+ 24
- 0
files/feeds.opml View File

@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<opml version="1.0">
<head>
<title>newsboat - Exported Feeds</title>
</head>
<body>
<outline type="rss" xmlUrl="https://blog.fefe.de/rss.xml?html" htmlUrl="http://blog.fefe.de/" title="Fefes Blog"/>
<outline type="rss" xmlUrl="http://www.lawblog.de/index.php/feed/" htmlUrl="https://www.lawblog.de/" title="law blog"/>
<outline type="rss" xmlUrl="https://www.kanzlei-hoenig.de/feed" htmlUrl="https://www.kanzlei-hoenig.de/" title="Strafverteidiger in Kreuzberg &#x2013; Kanzlei Hoenig Berlin"/>
<outline type="rss" xmlUrl="https://netzpolitik.org/feed" htmlUrl="https://netzpolitik.org/" title="netzpolitik.org"/>
<outline type="rss" xmlUrl="https://planet.archlinux.org/rss20.xml" htmlUrl="https://planet.archlinux.org/" title="Planet Arch Linux"/>
<outline type="rss" xmlUrl="https://uniporn.org/feed.rss" htmlUrl="https://uniporn.org/index.html" title="Uniporn's Blog"/>
<outline type="rss" xmlUrl="https://blog.jolla.com/feed" htmlUrl="https://blog.jolla.com/" title="Jolla Blog"/>
<outline type="rss" xmlUrl="https://sudosatirical.com/articles/index.xml" htmlUrl="https://www.sudosatirical.com/articles/" title="Articles on Sudo Satirical"/>
<outline type="rss" xmlUrl="https://marcwil.github.io/feed.xml" htmlUrl="https://marcwil.github.io/" title="Marcus Wilhelm"/>
<outline type="rss" xmlUrl="http://verfassungsblog.de/feed/" htmlUrl="https://verfassungsblog.de/" title="Verfassungsblog"/>
<outline type="rss" xmlUrl="https://ennolenze.de/feed" htmlUrl="https://ennolenze.de/" title="Enno Lenze"/>
<outline type="rss" xmlUrl="http://www.tagesschau.de/xml/rss2" htmlUrl="http://www.tagesschau.de/" title="tagesschau.de - Die Nachrichten der ARD"/>
<outline type="rss" xmlUrl="https://rss.golem.de/rss.php?feed=RSS2.0" htmlUrl="https://www.golem.de/" title="Golem.de"/>
<outline type="rss" xmlUrl="https://www.heise.de/rss/heise-atom.xml" htmlUrl="https://www.heise.de/" title="heise online News"/>
<outline type="rss" xmlUrl="https://www.theguardian.com/world/europe-news/rss" htmlUrl="https://www.theguardian.com/world/europe-news" title="Europe | The Guardian"/>
<outline type="rss" xmlUrl="https://www.theguardian.com/commentisfree/series/europe-now/rss" htmlUrl="https://www.theguardian.com/commentisfree/series/europe-now" title="Europe now | The Guardian"/>
</body>
</opml>

+ 40
- 0
files/podcasts.opml View File

@@ -0,0 +1,40 @@
<?xml version="1.0" ?>
<opml version="1.0">
<!--Generated by Podqast-->
<head>
<title>PodQasts</title>
<dateCreted>2019-04-12 21:17:44.899182</dateCreted>
<dateModified>2019-04-12 21:17:44.899182</dateModified>
</head>
<body>
<outline htmlUrl="https://alliterationamarsch.podigee.io/" text="Alliteration Am Arsch" xmlUrl="https://alliterationamarsch.podigee.io/feed/mp3"/>
<outline htmlUrl="http://www.alternativlos.org/" text="Alternativlos" xmlUrl="http://alternativlos.org/alternativlos.rss"/>
<outline htmlUrl="http://hintergrund.mik.fm" text="Aus dem Hintergrund" xmlUrl="http://hintergrund.mik.fm/feed/mp3/"/>
<outline htmlUrl="https://bartocast.de" text="Bartocast" xmlUrl="http://bartocast.de/?feed=podcast"/>
<outline htmlUrl="http://blog.binaergewitter.de" text="Binärgewitter" xmlUrl="http://feeds.feedburner.com/binaergewitter-podcast"/>
<outline htmlUrl="http://www.bradyheywood.com.au" text="Brady Heywood Podcast" xmlUrl="http://bradyheywood.libsyn.com/rss"/>
<outline htmlUrl="https://chaosradio.de" text="Chaosradio" xmlUrl="http://chaosradio.ccc.de/chaosradio-latest.rss"/>
<outline htmlUrl="https://cre.fm" text="CRE: Technik, Kultur, Gesellschaft" xmlUrl="https://feeds.metaebene.me/cre/m4a"/>
<outline htmlUrl="https://www.denkangebot.org" text="Denkangebot Podcast" xmlUrl="https://www.denkangebot.org/feed/mp3/"/>
<outline htmlUrl="https://wochendaemmerung.de" text="Die Wochendämmerung" xmlUrl="https://wochendaemmerung.de/feed/mp3/"/>
<outline htmlUrl="http://fokus-europa.de" text="Fokus Europa" xmlUrl="https://feeds.metaebene.me/fokuseuropa/m4a"/>
<outline htmlUrl="http://forschergeist.de" text="Forschergeist" xmlUrl="https://feeds.metaebene.me/forschergeist/mp3"/>
<outline htmlUrl="https://freakshow.fm" text="Freak Show" xmlUrl="https://feeds.metaebene.me/freakshow/m4a"/>
<outline htmlUrl="https://halbekatoffl.de" text="Halbe Katoffl" xmlUrl="https://halbekatoffl.de/feed/mp3/"/>
<outline htmlUrl="http://www.hoaxilla.de" text="Hoaxilla - Der skeptische Podcast aus Hamburg" xmlUrl="https://www.hoaxilla.de/podcast/hoaxilla.xml"/>
<outline htmlUrl="https://www.kuechenstud.io/lagedernation" text="Lage der Nation - der Politik-Podcast aus Berlin" xmlUrl="https://www.kuechenstud.io/lagedernation/feed/mp3/"/>
<outline htmlUrl="https://logbuch-netzpolitik.de" text="Logbuch:Netzpolitik" xmlUrl="https://feeds.metaebene.me/lnp/m4a"/>
<outline htmlUrl="https://www.kuechenstud.io/medienradio" text="Medienradio" xmlUrl="https://www.kuechenstud.io/medienradio/feed/mp3/"/>
<outline htmlUrl="http://minkorrekt.de" text="Methodisch inkorrekt" xmlUrl="http://minkorrekt.de/feed/m4a/"/>
<outline htmlUrl="https://www.metronaut.de" text="Metrolaut" xmlUrl="https://www.metronaut.de/feed/mp3/"/>
<outline htmlUrl="http://not-safe-for-work.de" text="Not Safe For Work" xmlUrl="https://feeds.metaebene.me/nsfw/m4a"/>
<outline htmlUrl="https://www.psycho-talk.de" text="Psychotalk" xmlUrl="https://www.psycho-talk.de/feed/m4a/"/>
<outline htmlUrl="http://raumzeit-podcast.de" text="Raumzeit" xmlUrl="https://feeds.metaebene.me/raumzeit/m4a"/>
<outline htmlUrl="https://rechtsbelehrung.com" text="Rechtsbelehrung - Recht, Technik &amp; Gesellschaft" xmlUrl="https://rechtsbelehrung.com/feed/podcast/"/>
<outline htmlUrl="https://requestforcomments.de" text="Request for Comments" xmlUrl="https://requestforcomments.de/feed/m4a"/>
<outline htmlUrl="https://ukw.fm" text="UKW" xmlUrl="https://ukw.fm/feed/mp3/"/>
<outline htmlUrl="https://macher.hornbach.de/" text="Werkstattgespräche" xmlUrl="https://werkstattgespraeche.podigee.io/feed/mp3"/>
<outline htmlUrl="http://www.wrint.de/kommt-reden-wir-zusammen/" text="WRINT: Wer redet ist nicht tot" xmlUrl="https://www.wrint.de/feed/podcast"/>
<outline htmlUrl="https://librelounge.org" text="Libre Lounge" xmlUrl="https://librelounge.org/atom-feed.atom"/>
</body>
</opml>

+ 34
- 0
files/stitch.sh View File

@@ -0,0 +1,34 @@
#!/bin/bash
# File : stitch.sh
# Author : Vincent Truchseß <redtux@posteo.net>
# Date : 10.04.2019
# Last Modified Date: 11.04.2019
# Last Modified By : Vincent Truchseß <redtux@posteo.net>


# Config Section
POSTS_DIR=
USER=
PASSWD=
INSTANCE=
BLOG_DOMAIN=

# Setup Paths, Filenames and urls
DRAFT="$1"
BASENAME="$(basename "$DRAFT")"
NAME="${BASENAME%.*}"

TARGET="$(date +%Y-%m-%d)-$NAME"
POST_URL="https://$BLOG_DOMAIN/posts/$TARGET.html"

# Copy draft to posts-folder adding date to filename
cp "$DRAFT" "$POSTS_DIR"/"$TARGET".md

# Posting title and link to article in fediverse-instance, getting status-url as response
TITLE="$(grep title: "$DRAFT" | cut -d ':' -f 2 | xargs)"
TEXT="$TITLE"%0D%0A"$POST_URL"
REQUEST_URL="https://$INSTANCE/api/v1/statuses"
STATUS_URL="$(curl -u $USER:$PASSWD --data status="$TEXT" -X POST $REQUEST_URL | jq -r .url)"

# Appending Discussion-Link to the fediverse-status at the End of Blogpost
printf "\n\n[Discussion](%s)\n" "$STATUS_URL" >> "$POSTS_DIR"/"$TARGET".md

+ 9
- 0
files/urls View File

@@ -0,0 +1,9 @@
https://blog.fefe.de/rss.xml?html
http://www.lawblog.de/index.php/feed/
https://www.kanzlei-hoenig.de/feed
https://netzpolitik.org/feed
https://planet.archlinux.org/rss20.xml
https://uniporn.org/feed.rss
https://blog.jolla.com/feed
https://sudosatirical.com/articles/index.xml
https://marcwil.github.io/feed.xml

BIN
images/fyber.png View File


+ 120
- 0
images/fyber.svg View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg4600"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="fyber.svg">
<defs
id="defs4594" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="276.78571"
inkscape:cy="620.60915"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-object-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-others="true"
inkscape:snap-bbox="false"
inkscape:snap-bbox-midpoints="false"
inkscape:bbox-nodes="false"
inkscape:snap-text-baseline="true"
inkscape:object-nodes="false"
inkscape:snap-nodes="false"
inkscape:snap-grids="false"
inkscape:snap-to-guides="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-center="true"
inkscape:window-width="1918"
inkscape:window-height="1055"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1" />
<metadata
id="metadata4597">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<flowRoot
xml:space="preserve"
id="flowRoot4602"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:192px;line-height:1.25;font-family:'Ubuntu Mono';-inkscape-font-specification:'Ubuntu Mono Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4604"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:192px;font-family:'Ubuntu Mono';-inkscape-font-specification:'Ubuntu Mono Bold'"><rect
id="rect4606"
width="160.35715"
height="252.85715"
x="201.42857"
y="441.44824"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:192px;font-family:'Ubuntu Mono';-inkscape-font-specification:'Ubuntu Mono Bold'" /></flowRegion><flowPara
id="flowPara4608">Fyyhu</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot4610"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.26458333,0,0,0.26458333,16.630952,-2.6066147)"><flowRegion
id="flowRegion4612"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;"><rect
id="rect4614"
width="469.64285"
height="174.64285"
x="111.42857"
y="433.59113"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;" /></flowRegion><flowPara
id="flowPara4616"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;"><flowSpan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;"
id="flowSpan4628">y</flowSpan><flowSpan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:77.15467072px;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:-1.73000002px;word-spacing:-14.44000056px;writing-mode:lr-tb;text-anchor:start;"
id="flowSpan4822">ber Space</flowSpan></flowPara></flowRoot> <rect
style="fill:#cc0ccc;fill-opacity:0;stroke:#000000;stroke-width:1.36810887;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
id="rect4996"
width="18.983681"
height="22.058235"
x="24.478767"
y="112.40718" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.41383934px;line-height:1.25;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.51034594"
x="23.717344"
y="143.71893"
id="text5000"
transform="scale(1.1040355,0.90576798)"><tspan
sodipodi:role="line"
id="tspan4998"
x="23.717344"
y="143.71893"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:20.41383934px;font-family:'DEC Terminal';-inkscape-font-specification:'DEC Terminal, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.51034594">F</tspan></text>
</g>
</svg>

BIN
images/haskell-logo.png View File


BIN
images/logo.png View File


+ 19
- 0
index.html View File

@@ -0,0 +1,19 @@
---
title: Home
---

<img src=images/logo.png style="float: right; margin: 10px;">
<p>VI's Blog</p>
<p>
This is my personal little Blog.<br>
It is still WIP, so you won't find much useful content here, but it will grow over time.<br>
Eventually I'll mostly write about tech-stuff such as my experiences as a
Gnu/Linux Operator, <b>Free Software</b> a little programming and the occasional nerdy commandline
magic.
</p>
<p>Latest posts:</p>

<h2>Posts</h2>
$partial("templates/post-list.html")$

<p>…or you can find more in the <a href="/archive.html">archives</a>.</p>

+ 10
- 0
posts/2019-04-08-day-zero.md View File

@@ -0,0 +1,10 @@
---
title: Day 0
date: 2019-04-08
author: VI
---

This is ***Post 0*** on my blog.

Nothing big to read about but if you can read this it means, building my html
and perhaps rss seems to work.

+ 21
- 0
posts/2019-04-10-commenting.md View File

@@ -0,0 +1,21 @@
---
title: Blog Comments
author: VI
---

This blog contains only static html and no interactive elements and I really
like it that way. Nevertheless I also would like to have a way to discuss a
blogpost with my readers (if any).
To solve this dilemma I have quickly hacked together a small script that creates
posts on my pleroma-server linking to a new blogpost and includes the url of the
pleroma post at the bottom of every blogpost.
So, If you want to comment on one of my blogposts and have a you have some kind of
fediverse-account
somewhere ___(which you should. It's 2019, dammit!)___ just click the
___"Discussion"___-link at the bottom of the page.
Within the next day I will make my small script nice and less hacky and write a
more detailed blogpost about it.
I am sorry for my language, but it is late and I am happy this works right now.


[Discussion](https://social.fyber.space/notice/9hfrAyRkzjDPVCORVo)

+ 65
- 0
posts/2019-04-11-poor-mans-comment-section.md View File

@@ -0,0 +1,65 @@
---
title: A poor Man's Comment Section
Author: vi
---

In my previous blogpost I mentioned that I hacked together a small script
stitching my blog and the fediverse together. Now I'll go a little more into
details.
You can find a copy of my script [here](../files/stitch.sh).

Hakyll, in the default configuration, has a ```posts```-folder containing
blogposts as markdown, having the publishing-date set in their filename.
I usually keep unfinished blogposts as ```.md```-files in my ```drafts```
folder, without having the timestamp in the filename yet.
It's still quite hacky, but it works for now and I don't have the freetime right
now to build a better fediverse-integration.

## Dependencies

There are only two external programs used:

* curl
* jq

## Configuring the script

In the beginning, I have to setup some parameters. I use ```pass``` as my
passwordmanager to store the password to my blog's fediverse-account. Since my
domains and stuff are no secret I'll just use them as an example here.

```bash
POSTS_DIR="$HOME/blog/posts"
USER="blog"
PASSWD="$(pass internet/social.fyber.space/blog)"
INSTANCE="social.fyber.space"
BLOG_DOMAIN="blog.fyber.space"
```

## Running it

The script takes one commandline-parameter, the path to the draft
to stitch and publish.
When executed it basically does the following things:

* Copy the draft to the ```posts```-folder, setting the date in the filename.
* Send a ```POST```-request posting a new Status on your fediverse-account.
* Parse the response and extract the url of the new status.
* Append a ___Discuss___-link at the end of the post pointing to the status in
the fediverse.

Afterwards, you just havt to run the usual

```bash
stack exec site build
stack exec site deploy
```

## Considerations

It would be cool to integrate this functionality directly into ___Hakyll___.
Eventually this comes on my list with things to code on the next CCC-Event which
would be the GPN19 in Karlsruhe for me this year.


[Discussion](https://social.fyber.space/notice/9hhtQVj3bXcb7uS0rg)

+ 168
- 0
posts/2019-04-17-off-the-grid.md View File

@@ -0,0 +1,168 @@
---
title: Off the Grid Computing
author: vi
---

The weather is getting better and I am currently spending a lot of time on my bike.
This is one of the reasons I am thinking more about how to improve my computing
experience while being disconnected from high-bandwidth internet.
In addition to this, there are quite a few more
situations I find myself in where there is usually no uplink available.
Being on a ferryboat for 9 hours having programming work to do is only one
example. Another one would be visiting friends in remote places or using a train
in Germany.

Some people in my sphere are heavily dependent on online-services. May it be
google-docs, dropbox or their online calendar. This is why I thought I'll write
down some of my workflow which doesn't depend much on online-services.

I would like to share my experience in this matter, which tools I found to be
good to be used if you can't rely on an all-online solution.
In this post I might leave out some details but it is not meant as a howto or
guide but as a number of hints on which ways to go with your daily computing.

## Blogging

To start with, I am writing this text as a plain markdown file locally on my
laptop, sitting outside, not having any wifi nearby. Usually I wouldn't even
notice since this website is statically generated on my local machine with
[hakyll](https://jaspervdj.be/hakyll/).
I can just write down whatever I want,
run a simple command to generate the html and push everything to my server
when I'm back online.
Having the task of composing separated from the act of publishing makes
me independent of a permanent network connection.
This was the main reason (apart from hakyll being written in haskell and haskell
being generally awesome) for me to build this blog without any CMS that require
a web-based interface to add/edit content.

## Keeping Track of Files with git

Usually I put everything into a ___git___ repo if it's text-files in some way. In contrast to, let's
say, SVN or the file-versioning of your cloud-service (e.g. dropbox) git works
completely offline. Of cause I also use (semi-)centralized gitservers to work
collaboratively and share my files, but with git you don't depend on it completely. For example, if
several people are editing the same file on their machines, these changes get
merged together afterwards and conflicts can be resolved in a sane and secure
manner.
I strongly advise you to learn to use git.

## Using plain Markdown files

Since you (hopefully) now have read all the git-tutorials available you might
have noticed that git only works well with plain text-files. But people want
formatting in their documents to make them more readable and structured compared
to
just plain text, whereas programs like LibreOffice use complex data-formats and make it virtually
impossible to keep track of changes in git.

This brings us to the topic of writing ___markdown___ files.
Markdown is a minimalistic markup language (like html or LaTeX) that is easy to
learn, human readable and easy to convert into various output formats. It
supports only basic formatting features but for most documents that's usually
enough.

### Example

```markdown
# There are Headlines

## With different depths

Also plain text is possible, as well as *italic* text, **bold** text,
[hyperlinks](https://www.wikipedia.org),
* As well
* as lists
```

Would look like this, when converted to html:

<div class="pre">
# There are Headlines

## With different depths

Also plain text is possible, as well as *italic* text, **bold** text,
[hyperlinks](https://www.wikipedia.org),

* As well
* as lists
</div>

To convert a markdown-file into a pdf or html I use a commandline tool called
___pandoc___, which is a universal document converter that can be used to
convert all
kinds of formats. The html-code of this website for example is generated by pandoc
from markdown files. There might be other markdown converters which are more
easy to use as well.
An alternative to markdown is also the ___Asciidoc___ format which has a few
more features.

## RSS

Many news-websites, podcasts and blogs (such as this one) publish their content not
only on the web in form of websites you can read in your browser,
but also in a machine-readable form. ___RSS___, which stands for ___Really
Simple Syndication___ is a standardized machine-readable format for web-feed
alike content. Usually you would use a RSS-reader, such as ___newsboat___ to
subscribe to a number of feeds. The reader then periodically downloads new
content from the subscribed websites to read offline.
This way, having my RSS-reader open in the background all the time, I always have
the latest news at the time of the last internet-contact on my laptop, ready to
be read later.

## Vdirsyncer and Offlineimap

Of cause I also want to have access to my calendars, addressbooks and e-mails
while being offline. There are two similar tools for these kind of tasks that I
found to be the most reliable so far.

### Calendars and Contacts

I usually have my calendar, my wife's calendar and my contacts synced with some
self-hosted online-service (e.g. Nextcloud), but a
google-account would work in this setup, too. ___Vdirsyncer___ is a small
commandline-utility to synchronize calendars and contacts from an online-service
onto a local machine, where they can be accessed by a regular Calendar/Contacts
manager such as ___Khal___, ___Khard___ or ___thunderbird___.

### E-Mail

___Offlineimap___ does essentially the same but for e-mails, syncing all your
directories from your e-mail provider on your local machine where they can
easily be accessed with any e-mail client such as ___mutt___, ___alpine___ or
___thunderbird___.

## Documentation

Graphical user-interfaces have the reputation to be easier to use and to be more
self-explaining than commandline-based software. This may be true on first
contact but as soon as you want to perform a more sophisticated task you quickly
end up googling your problem, eventually finding a solution.
But what if you don't have google at your fingertips. Most graphical programs
have a online-help function that won't be of much use offline. Commandline
utilities usually come with full documentation included. So, if you want to know
how to perform some task on with a specific program, just type in ```man <program_name>```
or ```info <program-name>``` to access it's documentation.


## Recap

You might have noticed that I mostly use commandline tools for my daily tasks.
I do so, not neccesaryly because I am offline sometimes but just out of personal
taste, experience with UNIX-ish operating-systems and plain nerdyness. It just
happened to turn out that many of these tools are still great to use without an
internet-connection.
I didn't go much into details where to find more information on the tools
described, simply out of lazyness. I have no reason to assume that I am more
capable in using a search engine then you are.

## PS

I also would like to write something about ___Secure Scuttlebutt___, a
distribbuted peer-to-peer social network with great offline capabilities, but I
just started using it about a week ago. Maybe I'll cover that in a later
blogpost.


[Discussion](https://social.fyber.space/notice/9huZnM2GBnrxs23mNc)

+ 108
- 0
site.hs View File

@@ -0,0 +1,108 @@
{-
- File : site.hs
- Author : Vincent Truchseß <redtux@posteo.net>
- Date : 04.04.2019
- Last Modified Date: 04.04.2019
- Last Modified By : Vincent Truchseß <redtux@posteo.net>
-}
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll


--------------------------------------------------------------------------------
main :: IO ()
main = hakyllWith config $ do
match "images/*" $ do
route idRoute
compile copyFileCompiler

match "files/*" $ do
route idRoute
compile copyFileCompiler

match "css/*" $ do
route idRoute
compile compressCssCompiler

match "favicon.png" $ do
route idRoute
compile copyFileCompiler

match (fromList ["about.md", "contact.md"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls

match "posts/*" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls

create ["archive.html"] $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx =
listField "posts" postCtx (return posts) `mappend`
constField "title" "Archives" `mappend`
defaultContext

makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls


match "index.html" $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" postCtx (return posts) `mappend`
constField "title" "Home" `mappend`
defaultContext

getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls

match "templates/*" $ compile templateBodyCompiler

create ["rss.xml"] $ do
route idRoute
compile $ do
-- let feedCtx = postCtx `mappend`
-- constField "description" "This is the post description"

posts <- fmap (take 20) . recentFirst =<< loadAllSnapshots "posts/*" "content"
renderRss myFeedConfiguration feedCtx posts


--------------------------------------------------------------------------------
postCtx :: Context String
postCtx =
dateField "date" "%B %e, %Y" `mappend`
defaultContext

feedCtx :: Context String
feedCtx = postCtx <> bodyField "description"

myFeedConfiguration :: FeedConfiguration
myFeedConfiguration = FeedConfiguration
{ feedTitle = "FyberSpace"
, feedDescription = "VI's Blog"
, feedAuthorName = "VI"
, feedAuthorEmail = ""
, feedRoot = "https://blog.fyber.space"
}

config = defaultConfiguration
{ deployCommand = "rsync -r _site/ leviathan:/var/www/blog/"
}

+ 64
- 0
stack.yaml View File

@@ -0,0 +1,64 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/

# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-12.26

# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# subdirs:
# - auto-update
# - wai
packages:
- .
# Dependency packages to be pulled from upstream that are not in the resolver
# using the same syntax as the packages field.
# (e.g., acme-missiles-0.3)
# extra-deps: []

# Override default flag values for local packages and extra-deps
# flags: {}

# Extra package databases containing global packages
# extra-package-dbs: []

# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.9"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor

+ 34
- 0
stitch.sh View File

@@ -0,0 +1,34 @@
#!/bin/bash
# File : stitch.sh
# Author : Vincent Truchseß <redtux@posteo.net>
# Date : 10.04.2019
# Last Modified Date: 11.04.2019
# Last Modified By : Vincent Truchseß <redtux@posteo.net>


# Config Section
POSTS_DIR="$HOME/blog/posts"
USER="blog"
PASSWD="$(pass internet/social.fyber.space/blog)"
INSTANCE="social.fyber.space"
BLOG_DOMAIN="blog.fyber.space"

# Setup Paths, Filenames and urls
DRAFT="$1"
BASENAME="$(basename "$DRAFT")"
NAME="${BASENAME%.*}"

TARGET="$(date +%Y-%m-%d)-$NAME"
POST_URL="https://$BLOG_DOMAIN/posts/$TARGET.html"

# Copy draft to posts-folder adding date to filename
cp "$DRAFT" "$POSTS_DIR"/"$TARGET".md

# Posting title and link to article in fediverse-instance, getting status-url as response
TITLE="$(grep title: "$DRAFT" | sed -E 's/^.+:\s*//' | sed -E 's/\s*$//')"
TEXT="$TITLE"%0D%0A"$POST_URL"
REQUEST_URL="https://$INSTANCE/api/v1/statuses"
STATUS_URL="$(curl -u $USER:$PASSWD --data status="$TEXT" -X POST $REQUEST_URL | jq -r .url)"

# Appending Discussion-Link to the fediverse-status at the End of Blogpost
printf "\n\n[Discussion](%s)\n" "$STATUS_URL" >> "$POSTS_DIR"/"$TARGET".md

+ 2
- 0
templates/archive.html View File

@@ -0,0 +1,2 @@
Here you can find all my previous posts:
$partial("templates/post-list.html")$

+ 36
- 0
templates/default.html View File

@@ -0,0 +1,36 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FyberSpace - $title$</title>
<link rel="stylesheet" href="/css/default.css" />
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body>
<header>
<div class="logo">
<a href="/"><img src="/images/fyber.png"></a>
</div>
<nav>
<a href="/">Home</a>
<a href="/about.html">About Me</a>
<a href="/archive.html">Archive</a>
<a href="/contact.html">Contact</a>
</nav>
</header>

<main role="main">
<h1>$title$</h1>
$body$
</main>

<footer>
<a href="/contact.html" style="float: left; padding-right: 8px;">Impress</a>
<a href="/rss.xml" style="float: left;">RSS feed</a>
Site proudly generated by
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
</footer>
</body>
</html>

+ 7
- 0
templates/post-list.html View File

@@ -0,0 +1,7 @@
<ul>
$for(posts)$
<li>
<a href="$url$">$title$</a> - $date$
</li>
$endfor$
</ul>

+ 11
- 0
templates/post.html View File

@@ -0,0 +1,11 @@
<article>
<section class="header">
Posted on $date$
$if(author)$
by $author$
$endif$
</section>
<section>
$body$
</section>
</article>

Loading…
Cancel
Save