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