Skip to content

Instantly share code, notes, and snippets.

@mrothNET
mrothNET / browser-info.html
Last active May 12, 2020
Quick'n'dirty browser info (Javascript)
View browser-info.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Browser Info</title>
</head>
<body>
<h1>Browser Info</h1>
<div id="info"></div>
@mrothNET
mrothNET / async.c
Last active Apr 28, 2019
AWAIT/ASYNC for embedded programming in C.
View async.c
#include <stdbool.h>
#include <stdint.h>
#define ASYNC(id_t) \
static id_t ASYNC__=0; switch (ASYNC__) case 0: while(1)
#define YIELD() \
do { ASYNC__=(__COUNTER__+2)/2; return; case (__COUNTER__+1)/2: ASYNC__=0; } while(0)
@mrothNET
mrothNET / dirnamedup.c
Created Jul 14, 2018
dirnamedup() - Simpler interface to dirname()
View dirnamedup.c
/*
Simpler interface to dirname() because dirname() has drawbacks:
- may modify the argument
- may return a pointer to static memory which gets
overwritten in subsequent calls
This function never modifies the argument and returns a pointer
to freshly allocated memory.
@mrothNET
mrothNET / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Last active Nov 6, 2020
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot
View LetsEncrypt+certbot+UFW+postfix+dovecot.md

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
You can’t perform that action at this time.