Skip to content

Instantly share code, notes, and snippets.

View NorseAnvil's full-sized avatar

NorseAnvil

  • Norway
View GitHub Profile
@dyvosvit
dyvosvit / proxybot-ssl.md
Created October 18, 2017 20:49 — forked from Helmi/ProfitTrailer-ssl.md
ProxyBot SSL and Basic Auth Tutorial (Ubuntu 16.04)

Securing ProxyBot behind SSL Reverse Proxy + Basic Auth

ProxyBot's own WebUI (Monitor) comes without any protection and could therefore be viewed by any other person as long as the Server and Port are reachable from the Internet.

This guide shows you how to secure the traffic to and from the Webinterface through SSL encryption and also hide it from others by putting Basic HTTP authentication into place.

Requirements

This guide is based on and made for Ubuntu 16.04 - if you're using other flavours of Linux or any other Operating System you might be able to use parts of it.

You also need a Domain name or sub domain / hostname that points to your server. Make sure to do this before you move on. Your provider probably already offers a subdomain for the server, otherwise it's on you to point one to it.

@HactarCE
HactarCE / README.md
Last active November 28, 2024 14:11
Factorio blueprint book list

This is just a collection of useful Factorio blueprint books I have either found online or made myself. (Links are included where applicable.) I recommend using this Chrome extension to quickly copy these into Factorio.

All blueprints use blue belts unless stated otherwise.

See also:

@etes
etes / pi_mount_usb.md
Last active February 3, 2026 19:09
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@thatalextaylor
thatalextaylor / 1-python-pretty-time-delta.py
Last active December 16, 2024 16:15
Pretty print a time delta in Python in days, hours, minutes and seconds
def pretty_time_delta(seconds):
sign_string = '-' if seconds < 0 else ''
seconds = abs(int(seconds))
days, seconds = divmod(seconds, 86400)
hours, seconds = divmod(seconds, 3600)
minutes, seconds = divmod(seconds, 60)
if days > 0:
return '%s%dd%dh%dm%ds' % (sign_string, days, hours, minutes, seconds)
elif hours > 0:
return '%s%dh%dm%ds' % (sign_string, hours, minutes, seconds)