Skip to content

Instantly share code, notes, and snippets.

View mrothNET's full-sized avatar

Michael Roth mrothNET

View GitHub Profile
@mrothNET
mrothNET / browser-info.html
Last active May 12, 2020 20:22
Quick'n'dirty browser info (Javascript)
<!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 April 28, 2019 21:54
AWAIT/ASYNC for embedded programming in 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 July 14, 2018 15:51
dirnamedup() - Simpler interface to dirname()
/*
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 October 27, 2023 00:36
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

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