From 86a23df7cc0ded588477e801d9043844fa951260 Mon Sep 17 00:00:00 2001 From: b1ek Date: Sun, 7 Jan 2024 14:57:03 +1000 Subject: [PATCH] add explanation about the online badge --- content/_index.md | 3 ++- content/online-badge.md | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 content/online-badge.md diff --git a/content/_index.md b/content/_index.md index b512d7f..1ccbf12 100644 --- a/content/_index.md +++ b/content/_index.md @@ -30,7 +30,8 @@ I can also be reached via [telegram](https://t.me/bleki42). I also made a lil badge to show if i am currently online. Cool, huh? -A badge showing if i am online or not. Sorry, the only way to know it is to load the gif. It would be all greeny if i am online +A badge showing if i am online or not. Sorry, the only way to know it is to load the gif. It would be all greeny if i am online +how does it work? ## Webrings!! I like webrings. diff --git a/content/online-badge.md b/content/online-badge.md new file mode 100644 index 0000000..c8b1e27 --- /dev/null +++ b/content/online-badge.md @@ -0,0 +1,9 @@ ++++ +title = 'The funny badge' ++++ + +It is actually dead simple: there is a simple server running on `online.blek.codes` and a cron job on my laptop that sends POST requests every minute (a heartbeat protocol basically) and that server serves that gif on URL `online.blek.codes/gif`. + +If the server didn't receive a heartbeat for a few minutes, it assumes that i am offline and serves the offline gif. + +You can [add it to your website too](http://git.blek.codes/blek/online.git), but it will require a bit of tinkering and requires you to have a web server as well. \ No newline at end of file