65 files changed, 144 insertions(+), 160 deletions(-)
M Makefile
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/01.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/01.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/02.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/02.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/03.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/03.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/04.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/04.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/05.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/05.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/06.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/06.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/07.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/07.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/08.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/08.webp
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/09.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/09.webp
R static/blog/burning-out-and-finding-out/01.webp => assets/blog/burning-out-and-finding-out/01.webp
R static/blog/divine-gift-archangel-michael-defeats-satan-painting/01.webp => assets/blog/divine-gift-archangel-michael-defeats-satan-painting/01.webp
R static/blog/divine-gift-archangel-michael-defeats-satan-painting/02.webp => assets/blog/divine-gift-archangel-michael-defeats-satan-painting/02.webp
R static/blog/hwang-to-gil-sao-paulo/01.webp => assets/blog/hwang-to-gil-sao-paulo/01.webp
R static/blog/hwang-to-gil-sao-paulo/02.webp => assets/blog/hwang-to-gil-sao-paulo/02.webp
R static/blog/hwang-to-gil-sao-paulo/03.webp => assets/blog/hwang-to-gil-sao-paulo/03.webp
R static/blog/hwang-to-gil-sao-paulo/04.webp => assets/blog/hwang-to-gil-sao-paulo/04.webp
R static/blog/hwang-to-gil-sao-paulo/05.webp => assets/blog/hwang-to-gil-sao-paulo/05.webp
R static/blog/image-processing-with-imagemagick-libwebp-and-hugo/png-result.png => assets/blog/image-processing-with-imagemagick-libwebp-and-hugo/png-result.png
R static/blog/image-processing-with-imagemagick-libwebp-and-hugo/webp-result.png => assets/blog/image-processing-with-imagemagick-libwebp-and-hugo/webp-result.png
R static/blog/implementing-correlation-ids-fsharp-giraffe-serilog/11.webp => assets/blog/implementing-correlation-ids-fsharp-giraffe-serilog/11.webp
R static/blog/ironing-out-bugs-with-fscheck/main.fsx => assets/blog/ironing-out-bugs-with-fscheck/main.fsx
R static/blog/krdonkas-in-guarulhos/01.webp => assets/blog/krdonkas-in-guarulhos/01.webp
R static/blog/krdonkas-in-guarulhos/02.webp => assets/blog/krdonkas-in-guarulhos/02.webp
R static/blog/krdonkas-in-guarulhos/03.webp => assets/blog/krdonkas-in-guarulhos/03.webp
R static/blog/krdonkas-in-guarulhos/04.webp => assets/blog/krdonkas-in-guarulhos/04.webp
R static/blog/mataroa-series-1-introducing-search/01.png => assets/blog/mataroa-series-1-introducing-search/01.png
R static/blog/quintal-paraense-and-chile-1937/01.webp => assets/blog/quintal-paraense-and-chile-1937/01.webp
R static/blog/quintal-paraense-and-chile-1937/02.webp => assets/blog/quintal-paraense-and-chile-1937/02.webp
R static/blog/quintal-paraense-and-chile-1937/03.webp => assets/blog/quintal-paraense-and-chile-1937/03.webp
R static/blog/quintal-paraense-and-chile-1937/04.webp => assets/blog/quintal-paraense-and-chile-1937/04.webp
R static/blog/quintal-paraense-and-chile-1937/05.webp => assets/blog/quintal-paraense-and-chile-1937/05.webp
R static/blog/quintal-paraense-and-chile-1937/06.webp => assets/blog/quintal-paraense-and-chile-1937/06.webp
R static/blog/quintal-paraense-and-chile-1937/07.webp => assets/blog/quintal-paraense-and-chile-1937/07.webp
R static/blog/quintal-paraense-and-chile-1937/08.webp => assets/blog/quintal-paraense-and-chile-1937/08.webp
R static/blog/quintal-paraense-and-chile-1937/09.webp => assets/blog/quintal-paraense-and-chile-1937/09.webp
R static/blog/setting-up-synology-ds1520/01.webp => assets/blog/setting-up-synology-ds1520/01.webp
R static/blog/simple-org-mode-setup-things-done/org-agenda-view.png => assets/blog/simple-org-mode-setup-things-done/org-agenda-view.png
R static/blog/synology-ds1520-memory-upgrade/01.webp => assets/blog/synology-ds1520-memory-upgrade/01.webp
R static/blog/synology-ds1520-memory-upgrade/02.webp => assets/blog/synology-ds1520-memory-upgrade/02.webp
R static/blog/synology-ds1520-memory-upgrade/03.webp => assets/blog/synology-ds1520-memory-upgrade/03.webp
R static/blog/synology-ds1520-memory-upgrade/04.webp => assets/blog/synology-ds1520-memory-upgrade/04.webp
R static/blog/this-will-deteriorate-quickly/01.webp => assets/blog/this-will-deteriorate-quickly/01.webp
R static/blog/working-with-a-database-using-sqlfun-and-asp-dot-net/script.fsx => assets/blog/working-with-a-database-using-sqlfun-and-asp-dot-net/script.fsx
R static/blog/writing-a-nix-module-for-static-website-hosting/default.nix => assets/blog/writing-a-nix-module-for-static-website-hosting/default.nix
R static/blog/writing-a-nix-module-for-static-website-hosting/test.nix => assets/blog/writing-a-nix-module-for-static-website-hosting/test.nix
R static/blogroll.xml => assets/blogroll.xml
R static/img/capybara-gopher.png => assets/img/capybara-gopher.png
R static/img/nana-icons/README.md => assets/img/nana-icons/README.md
R static/img/nana-icons/capybara.jpg => assets/img/nana-icons/capybara.jpg
R static/img/nana-icons/shiba-banana.jpg => assets/img/nana-icons/shiba-banana.jpg
R static/img/nana-icons/shiba-computer-low.jpg => assets/img/nana-icons/shiba-computer-low.jpg
R static/img/nana-icons/shiba-computer.jpg => assets/img/nana-icons/shiba-computer.jpg
R static/img/nana-icons/shy-rat.jpg => assets/img/nana-icons/shy-rat.jpg
R static/img/running-a-raspberry-pi-4-with-nixos/01.webp => assets/img/running-a-raspberry-pi-4-with-nixos/01.webp
R static/css/main.scss => assets/scss/main.scss
M config.yaml
M content-org/content.org
M layouts/_default/baseof.html
M layouts/_default/list.html
M layouts/index.html
M layouts/partials/footer.html
A layouts/partials/head.html
M layouts/partials/nav.html
M layouts/shortcodes/image.html
M Makefile => Makefile +1 -1
@@ 18,7 18,7 @@ public: content
.PHONY: run
run: clean content
- hugo serve --buildDrafts --buildFuture
+ hugo server --buildDrafts --buildFuture
.PHONY: publish
publish: clean public
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/01.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/01.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/02.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/02.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/03.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/03.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/04.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/04.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/05.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/05.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/06.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/06.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/07.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/07.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/08.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/08.webp +0 -0
R static/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/09.webp => assets/blog/a-day-walking-around-são-paulo-and-saint-vito-s-feast/09.webp +0 -0
R static/blog/burning-out-and-finding-out/01.webp => assets/blog/burning-out-and-finding-out/01.webp +0 -0
R static/blog/divine-gift-archangel-michael-defeats-satan-painting/01.webp => assets/blog/divine-gift-archangel-michael-defeats-satan-painting/01.webp +0 -0
R static/blog/divine-gift-archangel-michael-defeats-satan-painting/02.webp => assets/blog/divine-gift-archangel-michael-defeats-satan-painting/02.webp +0 -0
R static/blog/hwang-to-gil-sao-paulo/01.webp => assets/blog/hwang-to-gil-sao-paulo/01.webp +0 -0
R static/blog/hwang-to-gil-sao-paulo/02.webp => assets/blog/hwang-to-gil-sao-paulo/02.webp +0 -0
R static/blog/hwang-to-gil-sao-paulo/03.webp => assets/blog/hwang-to-gil-sao-paulo/03.webp +0 -0
R static/blog/hwang-to-gil-sao-paulo/04.webp => assets/blog/hwang-to-gil-sao-paulo/04.webp +0 -0
R static/blog/hwang-to-gil-sao-paulo/05.webp => assets/blog/hwang-to-gil-sao-paulo/05.webp +0 -0
R static/blog/image-processing-with-imagemagick-libwebp-and-hugo/png-result.png => assets/blog/image-processing-with-imagemagick-libwebp-and-hugo/png-result.png +0 -0
R static/blog/image-processing-with-imagemagick-libwebp-and-hugo/webp-result.png => assets/blog/image-processing-with-imagemagick-libwebp-and-hugo/webp-result.png +0 -0
R static/blog/implementing-correlation-ids-fsharp-giraffe-serilog/11.webp => assets/blog/implementing-correlation-ids-fsharp-giraffe-serilog/11.webp +0 -0
R static/blog/ironing-out-bugs-with-fscheck/main.fsx => assets/blog/ironing-out-bugs-with-fscheck/main.fsx +0 -0
R static/blog/krdonkas-in-guarulhos/01.webp => assets/blog/krdonkas-in-guarulhos/01.webp +0 -0
R static/blog/krdonkas-in-guarulhos/02.webp => assets/blog/krdonkas-in-guarulhos/02.webp +0 -0
R static/blog/krdonkas-in-guarulhos/03.webp => assets/blog/krdonkas-in-guarulhos/03.webp +0 -0
R static/blog/krdonkas-in-guarulhos/04.webp => assets/blog/krdonkas-in-guarulhos/04.webp +0 -0
R static/blog/mataroa-series-1-introducing-search/01.png => assets/blog/mataroa-series-1-introducing-search/01.png +0 -0
R static/blog/quintal-paraense-and-chile-1937/01.webp => assets/blog/quintal-paraense-and-chile-1937/01.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/02.webp => assets/blog/quintal-paraense-and-chile-1937/02.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/03.webp => assets/blog/quintal-paraense-and-chile-1937/03.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/04.webp => assets/blog/quintal-paraense-and-chile-1937/04.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/05.webp => assets/blog/quintal-paraense-and-chile-1937/05.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/06.webp => assets/blog/quintal-paraense-and-chile-1937/06.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/07.webp => assets/blog/quintal-paraense-and-chile-1937/07.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/08.webp => assets/blog/quintal-paraense-and-chile-1937/08.webp +0 -0
R static/blog/quintal-paraense-and-chile-1937/09.webp => assets/blog/quintal-paraense-and-chile-1937/09.webp +0 -0
R static/blog/setting-up-synology-ds1520/01.webp => assets/blog/setting-up-synology-ds1520/01.webp +0 -0
R static/blog/simple-org-mode-setup-things-done/org-agenda-view.png => assets/blog/simple-org-mode-setup-things-done/org-agenda-view.png +0 -0
R static/blog/synology-ds1520-memory-upgrade/01.webp => assets/blog/synology-ds1520-memory-upgrade/01.webp +0 -0
R static/blog/synology-ds1520-memory-upgrade/02.webp => assets/blog/synology-ds1520-memory-upgrade/02.webp +0 -0
R static/blog/synology-ds1520-memory-upgrade/03.webp => assets/blog/synology-ds1520-memory-upgrade/03.webp +0 -0
R static/blog/synology-ds1520-memory-upgrade/04.webp => assets/blog/synology-ds1520-memory-upgrade/04.webp +0 -0
R static/blog/this-will-deteriorate-quickly/01.webp => assets/blog/this-will-deteriorate-quickly/01.webp +0 -0
R static/blog/working-with-a-database-using-sqlfun-and-asp-dot-net/script.fsx => assets/blog/working-with-a-database-using-sqlfun-and-asp-dot-net/script.fsx +0 -0
R static/blog/writing-a-nix-module-for-static-website-hosting/default.nix => assets/blog/writing-a-nix-module-for-static-website-hosting/default.nix +0 -0
R static/blog/writing-a-nix-module-for-static-website-hosting/test.nix => assets/blog/writing-a-nix-module-for-static-website-hosting/test.nix +0 -0
R static/blogroll.xml => assets/blogroll.xml +0 -0
R static/img/capybara-gopher.png => assets/img/capybara-gopher.png +0 -0
R static/img/nana-icons/README.md => assets/img/nana-icons/README.md +0 -0
R static/img/nana-icons/capybara.jpg => assets/img/nana-icons/capybara.jpg +0 -0
R static/img/nana-icons/shiba-banana.jpg => assets/img/nana-icons/shiba-banana.jpg +0 -0
R static/img/nana-icons/shiba-computer-low.jpg => assets/img/nana-icons/shiba-computer-low.jpg +0 -0
R static/img/nana-icons/shiba-computer.jpg => assets/img/nana-icons/shiba-computer.jpg +0 -0
R static/img/nana-icons/shy-rat.jpg => assets/img/nana-icons/shy-rat.jpg +0 -0
R static/img/running-a-raspberry-pi-4-with-nixos/01.webp => assets/img/running-a-raspberry-pi-4-with-nixos/01.webp +0 -0
R static/css/main.scss => assets/scss/main.scss +42 -73
@@ 1,5 1,5 @@
:root {
- --width: 720px;
+ --width: 600px;
--component-padding: 20px;
--bg: white;
@@ 19,16 19,12 @@
}
}
-html {
- font-family: sans-serif;
-}
-
body {
font-family: sans-serif;
line-height: 1.5;
margin: auto;
max-width: var(--width);
- font-size: 1em;
+ // font-size: 1.1em;
padding: var(--component-padding);
background-color: var(--bg);
@@ 39,31 35,15 @@ body {
}
dt {
- font-weight: bold;
-}
-
-.menu ul {
- list-style: none;
- display: block;
- padding: 0;
- max-width: 45rem;
-}
-
-.menu li {
- display: inline-block;
- margin-right: 1rem;
- margin-right: 10px;
-}
-
-.menu li a {
- text-decoration: none;
- text-transform: uppercase;
+ font-weight: bold;
+ padding: 10px 0px 10px 0px;
}
article {
header {
margin-top: var(--component-padding);
margin-bottom: var(--component-padding);
+ border-bottom: 1px solid var(--text-color);
}
header > h1 {
@@ 75,18 55,6 @@ article {
}
}
-h1 {
- margin-bottom: 0.5rem;
-}
-
-main {
- margin: 0 auto;
-
- @media (max-width: 1000px) {
- padding: 0;
- }
-}
-
blockquote {
border: 1px solid var(--text-color);
border-left: 6px solid var(--text-color);
@@ 143,7 111,6 @@ a {
flex: 0 0 140px;
}
}
-
}
code {
@@ 165,7 132,8 @@ pre code {
pre {
padding: 10px;
overflow-x: auto;
- border: solid 1px var(--text-color);
+
+ background-color: var(--secondary-bg);
@media (prefers-color-scheme: dark) {
border: solid 1px var(--text-color);
@@ 254,19 222,21 @@ table {
border-collapse: collapse;
text-align: left;
width: 100%;
+ margin: 10px 0px 10px 0px;
th {
- background: var(--secondary-bg);
+ background: var(--secondary-bg);
font-weight: bold;
}
- tbody tr:nth-child(even) {
- background: var(--secondary-bg);
+ tbody tr:nth-child(even) {
+ background: var(--secondary-bg);
}
td,
th {
- border-bottom: 1px solid black;
+ border-bottom: 1px solid black;
+ padding: 0px 5px 0px 5px;
}
}
@@ 279,44 249,43 @@ ol li {
}
footer {
- padding: 20px;
- text-align: center;
+ nav ul {
+ list-style: none;
+ margin-left: 0;
+ padding-left: 0;
+ }
+
+ nav ul li {
+ display: inline-block;
+ }
}
-.image {
- width: 70%;
+figure {
+ margin: 0 auto;
+ width: 60%;
- img {
- display: block;
- margin: 0.5rem auto;
- max-width: 80%;
- }
+ img {
+ display: block;
+ margin: 0.5rem auto;
+ max-width: 80%;
+ }
- figure {
- margin: 0 20px 0 20px;
- }
+ figcaption {
+ margin: auto;
+ width: 90%;
+ text-align: center;
+ font-size: 0.8rem;
- figcaption {
- margin: auto;
- width: 90%;
- text-align: center;
- font-size: 0.8rem;
+ @media (prefers-color-scheme: dark) {
+ color: #555;
+ }
- @media (prefers-color-scheme: dark) {
- color: #555;
+ @media (max-width: 768px) {
+ width: 75%;
+ }
}
@media (max-width: 768px) {
- width: 75%;
+ width: 90%;
}
- }
-
- @media (max-width: 768px) {
- width: 90%;
- }
}
-
-.image-center {
- margin: auto;
- display: block;
-}>
\ No newline at end of file
M config.yaml => config.yaml +1 -2
@@ 3,7 3,6 @@ baseURL: "https://gluer.org"
languageCode: "en-us"
# pygmentsUseClasses = true
-assetDir: "static"
markup:
goldmark:
@@ 44,4 43,4 @@ outputFormats:
baseName: "atom"
RSS:
mediaType: "application/rss+xml"
- baseName: "rss">
\ No newline at end of file
+ baseName: "rss"
M content-org/content.org => content-org/content.org +39 -31
@@ 32,6 32,8 @@ A rendered version of my OPML file.
~glorifiedgluer's adventures.
#+end_description
+*** glorifiedgluer
+
Hi,
I'm a student and software developer based in *Guarulhos, Brazil*.
@@ 3391,7 3393,7 @@ If I were to put into words what each option should represent:
In order to implement the module, let's start this out with its
options:
-#+include: "../static/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "19-61"
+#+include: "../assets/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "19-61"
Whoa, this is a lot to unpack at once! Let's break it down and see
what we did so far.
@@ 3459,7 3461,7 @@ Alright, let's start the first portion of our configuration that will
be enabling the selected web server and creating the directories for
the websites.
-#+include: "../static/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "62-73"
+#+include: "../assets/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "62-73"
This will enable the web server with
~services."${cfg.webserver}".enable~. As previously shown,
@@ 3485,7 3487,7 @@ web server, not both at the same time. One way to do it is to use
Well, the boring part is the configuration itself:
-#+include: "../static/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "74-108"
+#+include: "../assets/blog/writing-a-nix-module-for-static-website-hosting/default.nix" src nix :lines "74-108"
That's it, this will do exactly what I wanted. It will enable the
chosen web server, create the directories for the domains I want to
@@ 3506,7 3508,7 @@ certificates for our testing Virtual Machines. Well, we can work this
out by only disabling HTTPS on the web server test. First, let's
declare the machines, one with Caddy and the other with Nginx
-#+include: "../static/blog/writing-a-nix-module-for-static-website-hosting/test.nix" src nix :lines "7-46"
+#+include: "../assets/blog/writing-a-nix-module-for-static-website-hosting/test.nix" src nix :lines "7-46"
This will configure two virtual machines, one called ~caddy~ and the
other called ~nginx~. Inside them we configure our
@@ 3516,7 3518,7 @@ write the test itself.
The testing library for NixOS allows you to write Python code to
validate your virtual machine. How does it look like?
-#+include: "../static/blog/writing-a-nix-module-for-static-website-hosting/test.nix" src nix :lines "46-64"
+#+include: "../assets/blog/writing-a-nix-module-for-static-website-hosting/test.nix" src nix :lines "46-64"
The code is really easy to grasp, we first start both virtual machines
with ~start_all()~, then with objects that have the name of our
@@ 4604,23 4606,23 @@ property was applicable to the section "Different paths, same
destination". Before starting, load the needed dependencies for our
testing:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "0-5"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "0-5"
Picture the following scenario, you have two lands and you have to sum
the area of both. The sum cannot output a negative number. This is
quite easy, isn't it? How hard can it be to introduce a bug?
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "6-12"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "6-12"
Executing the code shows us that our implementation is correct
according to the business rule:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "26-31"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "26-31"
But... is it, really? Let's bring FsCheck to the game and write a
simple test for the [[https://en.wikipedia.org/wiki/Associative_property][associative property]]:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "32-40"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "32-40"
A bit weird, isn't it? In F#, you can use backticks around a string to
make it a valid identifier. In this case, ~associativity of land sums~
@@ 4636,7 4638,7 @@ parameters and comparing to see if the argument order changes the
output. Which shouldn't. Let's feed FsCheck this function and see what
happens:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "40-41"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "40-41"
#+begin_example
Falsifiable, after 1 test (0 shrinks) (StdGen (511870660, 297192323)):
@@ 4661,7 4663,7 @@ it's impossible to apply this here as signature files are not
available on F# scripts. Here's a quick glance on how the ~create~
function could look like:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "12-26"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "12-26"
Alright, we know how to fix our code but we are unable to implement it
on our script file... Writing a custom [[https://fscheck.github.io/FsCheck/TestData.html#Generators][Generator]] that only spits valid
@@ 4669,7 4671,7 @@ data is an alternative. Again, there are numerous ways to implement a
generator, and I have opted for the ~gen~ computation expression
approach.
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "43-51"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "43-51"
What's [[https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html][~NormalFloat~]]? The documentation states: "/Represents a float
that is not NaN or Infinity./". This is perfect! Then we pipe the
@@ 4680,11 4682,11 @@ Here comes a really good tip. At work we struggled with functions
taking two custom generators, we just couldn't figure it out how to
pass them. Well, we struggled so you don't need to:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "51-55"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "51-55"
Now testing our two properties is trivial:
-#+include: "../static/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "56-58"
+#+include: "../assets/blog/ironing-out-bugs-with-fscheck/main.fsx" src fsharp :lines "56-58"
** Dealing with HttpClient and HttpRequestMessage in F# :fsharp:dotnet:
:PROPERTIES:
@@ 5200,7 5202,7 @@ Spaghetti al sugo.
Penne alla puttanesca.
#+end_image
-** Standalone IHttpClientFactory without ASP.NET's Dependency Injection :dotnet:fsharp:
+** IHttpClientFactory without ASP.NET's Dependency Injection :dotnet:fsharp:
:PROPERTIES:
:EXPORT_DATE: 2023-06-28
:EXPORT_FILE_NAME: standalone-ihttpclientfactory-without-asp-dot-net-s-dependency-injection
@@ 5451,27 5453,33 @@ Using Go & SQLite]]./
The complete list of pragmas can be found on [[https://www.sqlite.org/pragma.html#pragma_foreign_keys][SQLite’s official
website]].
-- Journal Mode :: Journal mode configures how SQLite writes
- transactions. You almost always want it as *WAL* (write ahead log).
+*** Journal Mode
+
+Journal mode configures how SQLite writes transactions. You almost
+always want it as *WAL* (write ahead log).
- #+begin_src sql
- PRAGMA journal_mode = WAL;
- #+end_src
+#+begin_src sql
+PRAGMA journal_mode = WAL;
+#+end_src
-- Busy timeout :: Busy timeout sets how long write transactions will
- wait to start. If unset, writes will fail immediately if another
- write is running. Five seconds might be enough... most of the times.
+*** Busy Timeout
- #+begin_src sql
- PRAGMA busy_timeout = 5000;
- #+end_src
+Busy timeout sets how long write transactions will wait to start. If
+unset, writes will fail immediately if another write is running. Five
+seconds might be enough... most of the times.
-- Foreign Keys :: Believe it or not, for historical reasons foreign
- keys are not enforced by default
+#+begin_src sql
+PRAGMA busy_timeout = 5000;
+#+end_src
- #+begin_src sql
- PRAGMA foreign_keys = ON;
- #+end_src
+*** Foreign Keys
+
+Believe it or not, for historical reasons foreign keys are not
+enforced by default.
+
+#+begin_src sql
+PRAGMA foreign_keys = ON;
+#+end_src
*** Usage in Go
M layouts/_default/baseof.html => layouts/_default/baseof.html +8 -18
@@ 1,27 1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>
- {{- block "title" . -}}
- {{- .Site.Title -}}
- {{ end }}
- </title>
- {{ $style := resources.Get "css/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
- <link rel="stylesheet" href="{{ $style.RelPermalink }}" />
- {{- template "_internal/opengraph.html" . -}}
+ {{- partial "head.html" . -}}
</head>
<body>
- {{- partial "nav.html" -}}
- <main>
- {{- block "main" . -}}
- {{ end }}
- </main>
-
- {{- block "footer" . -}}
- {{- partial "footer.html" . -}}
+ <main>
+ {{- block "main" . -}}
{{ end }}
</main>
+
+ <hr>
+ {{- block "footer" . -}}
+ {{- partial "footer.html" . -}}
+ {{ end }}
</body>
</html>
M layouts/_default/list.html => layouts/_default/list.html +1 -1
@@ 6,7 6,7 @@
<article>
<header>
<h1>{{ .Title | title }}</h1>
- <p><a href="{{.Site.BaseURL}}/{{.Section}}/atom.xml">RSS feed</a></p>
+ <p><a href="{{.Site.BaseURL}}{{.Section}}/atom.xml">RSS feed</a></p>
</header>
<ul class="page-list">
M layouts/index.html => layouts/index.html +5 -1
@@ 1,6 1,10 @@
{{ define "main" }}
{{.Content}}
+ <hr>
+
+ <h2>Latest Posts</h2>
+
<section>
{{ $pgFilter1 := where .Site.RegularPages "Draft" false }}
{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }}
@@ 16,7 20,7 @@
</section>
{{ if and (.Paginator) (gt .Paginator.TotalPages 1) }}
- <!--
+ <!--
keeping this here if I ever want to add pagination buttons or
something else
-->
M => +12 -4
@@ 1,6 1,14 @@
<footer>
<p><em>
Have something to say about this? Feel free to send me an email at
<a href="mailto:~glorifiedgluer/inbox@lists.sr.ht">my inbox</a>.
</em></p>
<nav>
<ul>
<a href="/">Home</a> |
<a href="/blog">Blog</a> |
<a href="https://git.sr.ht/~glorifiedgluer/gluer.org">Source</a>
</ul>
</nav>
<p>
Have something to say about this? Feel free to send me an email at
<a href="mailto:~glorifiedgluer/inbox@lists.sr.ht">my inbox</a>.
</p>
</footer>
A layouts/partials/head.html => layouts/partials/head.html +10 -0
@@ 0,0 1,10 @@
+<title>{{ .Title }}</title>
+
+<meta charset="utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+
+{{ $sass := resources.Get "scss/main.scss" }}
+{{ $style := $sass | resources.ToCSS | resources.Fingerprint "sha512" }}
+<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" />
+
+{{- template "_internal/opengraph.html" . -}}
M layouts/partials/nav.html => layouts/partials/nav.html +0 -1
@@ 5,7 5,6 @@
<ul>
<a href="/">Home</a>
<a href="/blog">Blog</a>
- <a href="/blogroll">Blogroll</a>
</ul>
</nav>
</header>
M layouts/shortcodes/image.html => layouts/shortcodes/image.html +25 -28
@@ 1,37 1,34 @@
{{/* possible sizes */}}
{{ $sizes := (slice "480" "800" "1200" "1500") }}
-{{ $side := .Get "side" | default "center" }}
{{ $src := resources.Get (.Get "src") }}
{{ $caption := .Inner | default "" }}
-<div class="image image-{{- $side -}}">
- <figure>
- <img
- sizes="(min-width: 35em) 1500px, 100vw"
+<figure>
+ <img
+ sizes="(min-width: 35em) 1500px, 100vw"
- {{/* Only resize if the image width size is bigger than the resize size. */}}
- srcset='
- {{ range $sizes }}
- {{ if ge $src.Width . }}
- {{ ($src.Resize (printf "%sx" .)).Permalink }} {{ (printf "%sw" .) }},
- {{ end }}
- {{ end }}'
+ {{/* Only resize if the image width size is bigger than the resize size. */}}
+ srcset='
+ {{ range $sizes }}
+ {{ if ge $src.Width . }}
+ {{ ($src.Resize (printf "%sx" .)).Permalink }} {{ (printf "%sw" .) }},
+ {{ end }}
+ {{ end }}'
- {{/* when no support for srcset (old browsers, RSS), we load small (800px) */}}
- {{/* if image smaller than 800, then load the image itself */}}
- {{ if ge $src.Width "800" }}
- src="{{ ($src.Resize "800x").Permalink }}"
- {{ else }}
- src="{{ $src.Permalink }}"
- {{ end }}
- alt="{{- $caption -}}" loading="lazy"/>
+ {{/* when no support for srcset (old browsers, RSS), we load small (800px) */}}
+ {{/* if image smaller than 800, then load the image itself */}}
+ {{ if ge $src.Width "800" }}
+ src="{{ ($src.Resize "800x").Permalink }}"
+ {{ else }}
+ src="{{ $src.Permalink }}"
+ {{ end }}
+ alt="{{- $caption -}}" loading="lazy"/>
+ <figcaption>
+ {{ if $caption }}
+ <em>{{ $caption | markdownify }}</em>
+ {{ end }}
+ (<a href="{{ $src.Permalink }}">full size</a>)
+ </figcaption>
+</figure>
- <figcaption>
- {{ if $caption }}
- <em>{{ $caption | markdownify }}</em>
- {{ end }}
- (<a href="{{ $src.Permalink }}">full size</a>)
- </figcaption>
- </figure>
-</div>