summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemfeed/2008-06-26-perl-poetry.md6
-rw-r--r--gemfeed/2010-05-09-the-fype-programming-language.md4
-rw-r--r--gemfeed/2011-05-07-perl-daemon-service-framework.md12
-rw-r--r--gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md6
-rw-r--r--gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md12
-rw-r--r--gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md7
-rw-r--r--gemfeed/2021-09-12-keep-it-simple-and-stupid.md2
-rw-r--r--gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md4
-rw-r--r--gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md6
-rw-r--r--index.md2
-rw-r--r--testpage.md17
-rw-r--r--uptime-stats.md2
12 files changed, 48 insertions, 32 deletions
diff --git a/gemfeed/2008-06-26-perl-poetry.md b/gemfeed/2008-06-26-perl-poetry.md
index 1dc389df..3f55b5e8 100644
--- a/gemfeed/2008-06-26-perl-poetry.md
+++ b/gemfeed/2008-06-26-perl-poetry.md
@@ -33,7 +33,7 @@ Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as
## math.pl
-```
+```perl
#!/usr/bin/perl
# (C) 2006 by Paul C. Buetow
@@ -77,7 +77,7 @@ __END__
## christmas.pl
-```
+```perl
#!/usr/bin/perl
# (C) 2006 by Paul C. Buetow
@@ -123,7 +123,7 @@ This is perl, v5.8.8 built for i386-freebsd-64int
## shopping.pl
-```
+```perl
#!/usr/bin/perl
# (C) 2007 by Paul C. Buetow
diff --git a/gemfeed/2010-05-09-the-fype-programming-language.md b/gemfeed/2010-05-09-the-fype-programming-language.md
index 7964d59f..a48955a7 100644
--- a/gemfeed/2010-05-09-the-fype-programming-language.md
+++ b/gemfeed/2010-05-09-the-fype-programming-language.md
@@ -23,7 +23,7 @@ The Fype interpreter is written in an object-oriented style of C. Each "main com
To give you an idea of how it works here as an example is a snippet from the main Fype "class header":
-```
+```c
typedef struct {
Tupel *p_tupel_argv; // Contains command line options
List *p_list_token; // Initial list of token
@@ -34,7 +34,7 @@ typedef struct {
And here is a snippet from the primary Fype "class implementation":
-```
+```c
Fype*
fype_new() {
Fype *p_fype = malloc(sizeof(Fype));
diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.md b/gemfeed/2011-05-07-perl-daemon-service-framework.md
index b9369dfe..a1dfa796 100644
--- a/gemfeed/2011-05-07-perl-daemon-service-framework.md
+++ b/gemfeed/2011-05-07-perl-daemon-service-framework.md
@@ -26,7 +26,7 @@ PerlDaemon supports:
## Quick Guide
-```
+```sh
# Starting
./bin/perldaemon start (or shortcut ./control start)
@@ -43,7 +43,7 @@ To stop a daemon from running in foreground mode, "Ctrl+C" must be hit. To see m
The daemon instance can be configured in "./conf/perldaemon.conf". If you want to change a property only once, it is also possible to specify it on the command line (which will take precedence over the config file). All available config properties can be displayed via "./control keys":
-```
+```sh
pb@titania:~/svn/utils/perldaemon/trunk$ ./control keys
# Path to the logfile
daemon.logfile=./log/perldaemon.log
@@ -74,7 +74,7 @@ daemon.wd=./
So let's start the daemon with a loop interval of 10 seconds:
-```
+```sh
$ ./control keys | grep daemon.loopinterval
daemon.loopinterval=1
$ ./control keys daemon.loopinterval=10 | grep daemon.loopinterval
@@ -90,7 +90,7 @@ Stopping daemon now...
If you want to change that property forever, either edit perldaemon.conf or do this:
-```
+```sh
$ ./control keys daemon.loopinterval=10 > new.conf; mv new.conf conf/perldaemon.conf
```
@@ -104,7 +104,7 @@ PerlDaemon uses `Time::HiRes` to make sure that all the events run incorrect int
This is one of the example modules you will find in the source code. It should be pretty self-explanatory if you know Perl :-).
-```
+```perl
package PerlDaemonModules::ExampleModule;
use strict;
@@ -140,7 +140,7 @@ sub do ($) {
Want to give it some better use? It's just as easy as:
-```
+```sh
cd ./lib/PerlDaemonModules/
cp ExampleModule.pm YourModule.pm
vi YourModule.pm
diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
index c27afebb..40e1c589 100644
--- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
+++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md
@@ -10,7 +10,7 @@ In computing, a polyglot is a computer program or script written in a valid form
For fun, I programmed my own Polyglot, which is both valid Perl, Raku, C and C++ code (I have added C++ and Raku support in 2022). The exciting part about C and C++ is that $ is a valid character to start variable names with:
-```
+```perl
#include <stdio.h>
#define $arg function_argument
@@ -60,7 +60,7 @@ You can find the full source code at GitHub:
### Let's run it with C and C++
-```
+```sh
% gcc fibonacci.pl.raku.c -o fibonacci
% ./fibonacci
Hello, welcome to the Fibonacci Numbers!
@@ -100,7 +100,7 @@ fib(10) = 55
### Let's run it with Perl and Raku
-```
+```sh
% perl fibonacci.pl.raku.c
Hello, welcome to the Fibonacci Numbers!
This program is all, valid C and C++ and Perl and Raku code!
diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md
index a10c6d17..e206d594 100644
--- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md
+++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md
@@ -29,7 +29,7 @@ All scripts mentioned here can be found on GitHub at:
This is to be performed on a Fedora Linux machine (could work on a Debian too, but Fedora is just what I use on my Laptop). The following steps prepare an initial Debian base image, which can then be transferred to the phone.
-```code
+```sh
sudo dnf install debootstrap
# 5g
dd if=/dev/zero of=jessie.img bs=$[ 1024 * 1024 ] \
@@ -54,7 +54,7 @@ sudo umount jessie
Now setup the Debian image on an external SD card on the Phone via Android Debugger as follows:
-```
+```sh
adb root && adb wait-for-device && adb shell
mkdir -p /storage/sdcard1/Linux/jessie
exit
@@ -97,7 +97,7 @@ mount | grep jessie
This is to be performed on the Android phone itself (inside a Debian chroot):
-```
+```sh
chroot $(pwd)/jessie /bin/bash -l
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
/debootstrap/debootstrap --second-stage
@@ -109,7 +109,7 @@ exit # Leave adb shell
jessie.sh deals with all the loopback mount magic and so on. It will be run later every time you start Debroid on your phone.
-```
+```sh
# Install script jessie.sh
adb push storage/sdcard1/Linux/jessie.sh /storage/sdcard/Linux/jessie.sh
adb shell
@@ -146,7 +146,7 @@ exit # Exit chroot
This enters Debroid on your phone and starts the example service uptimed:
-```
+```sh
sh jessie.sh enter
# Setup example serice uptimed
@@ -166,7 +166,7 @@ exit # Exit adb shell
If you want to start Debroid automatically whenever your phone starts, then do the following:
-```
+```sh
adb push data/local/userinit.sh /data/local/userinit.sh
adb shell
chmod +x /data/local/userinit.sh
diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md
index f66f7252..12022a59 100644
--- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md
+++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.md
@@ -79,7 +79,7 @@ The Bash is suitable very well for small scripts and ad-hoc automation on the co
I modularized the code so that each core functionality has its own file in ./lib. All the modules are included from the main Gemtexter script. For example, there is one module for HTML generation, one for Markdown generation, and so on.
-```
+```sh
paul in uranus in gemtexter on 🌱 main
❯ wc -l gemtexter lib/*
117 gemtexter
@@ -122,16 +122,15 @@ It has been proven quite helpful to have unit tests in place for the HTML part a
### HTML unit test example
-```
+```bash
gemtext='=> http://example.org Description of the link'
assert::equals "$(generate::make_link html "$gemtext")" \
'<a class="textlink" href="http://example.org">Description of the link</a><br />'
-
```
### Markdown unit test example
-```
+```bash
gemtext='=> http://example.org Description of the link'
assert::equals "$(generate::make_link md "$gemtext")" \
'[Description of the link](http://example.org) '
diff --git a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md
index 0a9afea6..2db77c58 100644
--- a/gemfeed/2021-09-12-keep-it-simple-and-stupid.md
+++ b/gemfeed/2021-09-12-keep-it-simple-and-stupid.md
@@ -2,7 +2,7 @@
> Published at 2021-09-12T09:39:20+03:00; Updated at 2023-03-23
-```
+```
_______________ |*\_/*|_______
| ___________ | .-. .-. ||_/-\_|______ |
| | | | .****. .****. | | | |
diff --git a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md
index f602cfc0..ec47fc6e 100644
--- a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md
+++ b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.md
@@ -26,7 +26,7 @@ It has been around a year since I released the first version `1.0.0`. Although,
Gemtexter relies on the GNU versions of the tools `grep`, `sed` and `date` and it also requires the Bash shell in version 5 at least. That's now done in the `check_dependencies()` function:
-```
+```bash
check_dependencies () {
# At least, Bash 5 is required
local -i required_version=5
@@ -60,7 +60,7 @@ The Bash is not the most performant language. Gemtexter already takes a couple o
Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:
-```
+```sh
./gemtexter --generate '.*hello.*'
```
diff --git a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md
index ba45e138..4132da01 100644
--- a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md
+++ b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.md
@@ -95,7 +95,7 @@ You can configure `PRE_GENERATE_HOOK` and `POST_PUBLISH_HOOK` to point to script
The sample config file `gemtexter.conf` includes this as an example now; these scripts will only be executed when they actually exist:
-```
+```bash
declare -xr PRE_GENERATE_HOOK=./pre_generate_hook.sh
declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh
```
@@ -110,7 +110,7 @@ Here is the breaking change to older versions of Gemtexter. The `$BASE_CONTENT_D
An example blog post without any publishing date looks like this:
-```
+```sh
% cat gemfeed/2023-02-26-title-here.gmi
# Title here
@@ -119,7 +119,7 @@ The remaining content of the Gemtext file...
Gemtexter will add a line starting with `> Published at ...` now. Any subsequent Atom feed generation will then use that date.
-```
+```sh
% cat gemfeed/2023-02-26-title-here.gmi
# Title here
diff --git a/index.md b/index.md
index 3f62140f..8783c005 100644
--- a/index.md
+++ b/index.md
@@ -1,6 +1,6 @@
# foo.zone
-> This site was generated at 2023-04-08T12:32:06+03:00 by `Gemtexter`
+> This site was generated at 2023-04-09T13:36:18+03:00 by `Gemtexter`
```
|\---/|
diff --git a/testpage.md b/testpage.md
index d89531bf..d88018f9 100644
--- a/testpage.md
+++ b/testpage.md
@@ -40,6 +40,23 @@ else
fi
```
+```bash
+# Jo
+❯ exec 5<>/dev/tcp/google.de/80
+❯ echo -e "GET / HTTP/1.1\nhost: google.de\n\n" >&5
+❯ cat <&5 | head
+HTTP/1.1 301 Moved Permanently
+Location: http://www.google.de/
+Content-Type: text/html; charset=UTF-8
+Date: Thu, 18 Nov 2021 08:27:18 GMT
+Expires: Sat, 18 Dec 2021 08:27:18 GMT
+Cache-Control: public, max-age=2592000
+Server: gws
+Content-Length: 218
+X-XSS-Protection: 0
+X-Frame-Options: SAMEORIGIN
+```
+
Foo0
Bar0
diff --git a/uptime-stats.md b/uptime-stats.md
index 72e0b96d..a65e7d32 100644
--- a/uptime-stats.md
+++ b/uptime-stats.md
@@ -1,6 +1,6 @@
# My machine uptime stats
-> This site was last updated at 2023-04-08T12:32:07+03:00
+> This site was last updated at 2023-04-09T13:36:18+03:00
The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `guprecords`, the global uptime records stats analyser of mine.