Skip to content

Instantly share code, notes, and snippets.

View jbonadiman's full-sized avatar
🤙

João Vitor Bonadiman jbonadiman

🤙
View GitHub Profile
@maxkagamine
maxkagamine / Nginx & certbot on Unraid.md
Last active March 9, 2024 09:01
Guide to running an nginx reverse proxy on Unraid with a Let's Encrypt wildcard cert, using the official nginx and certbot Docker images.

Nginx & certbot on Unraid

Here's a guide to running an nginx reverse proxy on Unraid with a Let's Encrypt wildcard cert (which can cover the Unraid web gui too), using the official nginx and certbot Docker images.

Other options:

  • caddy — popular nginx alternative with built-in automatic Let's Encrypt
  • pomerium — all-in-one reverse proxy, SSL, and OAuth-based login (compare to Caddy Security)
  • nginx-certbot — parses your nginx configs and manages certbot for you (see the original version of this gist for a script to copy your cert to Unraid)
  • swag — used to be called letsencrypt; has other things in it like PHP & f
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 6, 2024 15:28
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@shawwwn
shawwwn / uping.py
Last active April 29, 2024 17:45
µPing: Ping library for MicroPython
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <shawwwn1@gmail.com>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
def checksum(data):
if len(data) & 0x1: # Odd number of bytes
@ubergesundheit
ubergesundheit / readme.md
Last active February 5, 2024 10:46
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@marfillaster
marfillaster / README.md
Last active February 1, 2023 10:07
WSL Desktop Launched i3wm

WSL Desktop Launched i3wm

Requirements VcXsrv, i3wm in wsl.

The three files below must be stored in the same directory (%UserProfile%\Desktop).

  • i3.vbs - This is the entrypoint script. It runs i3.bat in the background.
  • i3.bat - Runs VcXsrv using d0.xlaunch profile then starts i3
  • d0.xlaunch - VcXsrv in "One window without titlebar" mode at DISPLAY=:0
@lpsandaruwan
lpsandaruwan / windows_font_installer.py
Last active March 3, 2024 22:34
Install a font file in Windows - Python3
""" Python 3 Windows font installer
Script must be run with the privileges in order to access Windows fonts directory. System reboot is not necessary.
This will install the font and will inform programs that a new font has been added.
Python3 Windows font installer is a free python script: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active March 19, 2024 17:24 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@shivshank
shivshank / vox_to_obj_exporter.py
Last active December 31, 2023 01:12
Exports from MagicaVoxel VOX to OBJ. Can preserve all edges for easy editing in a program like Blender.
"""
This script is designed to export a mass amount of MagicaVoxel .vox files
to .obj. Unlike Magica's internal exporter, this exporter preserves the
voxel vertices for easy manipulating in a 3d modeling program like Blender.
Various meshing algorithms are included (or to be included). MagicaVoxel
uses monotone triangulation (I think). The algorithms that will (or do)
appear in this script will use methods to potentially reduce rendering
artifacts that could be introduced by triangulation of this nature.