Skip to content

Instantly share code, notes, and snippets.

View lokulin's full-sized avatar
☠️
dithering...and not in the floyd-steinberg sense.

Lauchlin lokulin

☠️
dithering...and not in the floyd-steinberg sense.
View GitHub Profile
@shtrom
shtrom / fritz_cert_upload.py
Last active March 12, 2023 17:01
Upload a TLS key and cert to a FRITZ!Box, in pretty Python
#!/usr/bin/env python3
# vim: fileencoding=utf-8
"""
Upload a TLS key and cert to a FRITZ!Box, in pretty Python
Copyright (C) 2018--2021 Olivier Mehani <shtrom@ssji.net>
This program is free software; 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 2 of the License, or
(at your option) any later version.
@aortbals
aortbals / squash-and-merge-cli.md
Last active January 16, 2024 10:46
Squash and Merge on the Command line

With the introduction of GitHub's Squash and Merge feature, this has become less prevelant, however it's still useful in scenarios where GitHub's interface is unavailable.

Let's talk through two ways to do a squash and merge on the command line.

Take 1: Interactive Rebase

When to use it

  • When you have not merged main into your feature branch
  • There are no merge conflicts
@wikrie
wikrie / fritzbox-cert-update.sh
Last active March 2, 2024 10:48
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS)
## to the router (Fritzbox).
## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser.
## thanks to https://gist.github.com/mahowi for the perfect Idea
## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal.
## since Fritz OS 7.25 it is needed to select a Username, from a security point of view
## it is always a good idea to have a non default user name. And as normaly a Fritz Box
## is connected to the Internet, the prefered method should be WITH Username.
@mcharytoniuk
mcharytoniuk / Vagrantfile
Last active April 30, 2021 05:00
Vagrant + docker-compose
Vagrant.configure(2) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.network "forwarded_port", guest: 3306, host: 3306
# If errors occur, try running "vagrant provision" manually
# after "vagrant up"
config.vm.provision :docker
# To use docker_compose as a provisioning tool, install
# vagrant-docker-compose plugin first. It should also solve the
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@willurd
willurd / web-servers.md
Last active April 23, 2024 23:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000