Skip to content

Instantly share code, notes, and snippets.

View fastjack's full-sized avatar

Martin Maciaszek fastjack

View GitHub Profile
@giggio
giggio / settings.json5
Last active April 30, 2024 00:22
Giovanni Bassi's Windows terminal config
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema-preview",
// "$schema": "https://raw.githubusercontent.com/microsoft/terminal/main/doc/cascadia/profiles.schema.json", // canary
// "$schema": "https://aka.ms/terminal-profiles-schema-preview", // preview
// "$schema": "https://aka.ms/terminal-profiles-schema", // stable
"actions": [
{
"command": {
"action": "moveFocus",
@lg
lg / adding-tailscale-to-edgerouter.md
Last active April 11, 2024 07:44
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@ronaldb
ronaldb / docker-compose.yml
Last active April 7, 2024 04:29
Docker - Use secrets in a single node docker environment and mysql
version: "3.6"
services:
my_sql:
image: mysql:5.7
volumes:
- ./data:/var/lib/mysql
secrets:
- my_secret
@shmup
shmup / twitch_irssi.md
Last active March 19, 2024 11:50 — forked from hunterbridges/twitch_irc.md
How to connect to Twitch with IRSSI (SSL)

IRSSI / TWITCH

Here's a method to chat in a twitch #channel with IRSSI

Get your oauth token here: https://twitchapps.com/tmi/

Server block

server = {
 address = "irc.chat.twitch.tv";
@mislav
mislav / windows-on-mac.md
Last active February 21, 2024 23:38
Install Windows 11 in a virtual machine on macOS with an M1 CPU

Based on https://docs.getutm.app/guides/windows/

  1. You will need:
    • A Windows 10 or Windows 11 license key;
    • UTM for Mac - the App Store version is offered as a way to support the developers, since it's paid, but has the same features as the free build.
  2. Obtain scripts that bootstrap an arm64 Windows 11 22H2 (I've chosen Windows Home edition and not Pro);
  3. brew install aria2 cabextract wimlib cdrtools minacle/chntpw/chntpw;
  4. cd into the directory extracted in step 1 and bash uup_download_macos.sh - this will produce an ISO;
  5. In the UTM app, create a new “Virtualize” machine and mount the ISO file from the previous step;
  6. Check “Install drivers and SPICE tools”;
@hranicka
hranicka / project.docker-compose.yml
Created November 28, 2019 12:29
Traefik & multiple docker-compose projects
version: '3'
services:
nginx:
labels:
- "traefik.enable=true"
- "traefik.http.routers.provys-transformer.rule=Host(`www.example.com`)"
- "traefik.http.routers.provys-transformer.tls=true"
networks:
- traefik
@laundmo
laundmo / lerp.py
Last active February 20, 2024 16:19
lerp, inverse lerp and remap in python
def lerp(a: float, b: float, t: float) -> float:
"""Linear interpolate on the scale given by a to b, using t as the point on that scale.
Examples
--------
50 == lerp(0, 100, 0.5)
4.2 == lerp(1, 5, 0.8)
"""
return (1 - t) * a + t * b
@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:

@LilithWittmann
LilithWittmann / autobahn.md
Last active October 26, 2023 12:11
autobahn.md
@aeroaks
aeroaks / reset_timer.py
Created December 2, 2014 08:32
Reset Timer in Python
from threading import Thread, Event, Timer
import time
def TimerReset(*args, **kwargs):
""" Global function for Timer """
return _TimerReset(*args, **kwargs)
class _TimerReset(Thread):
"""Call a function after a specified number of seconds: