Skip to content

Instantly share code, notes, and snippets.

View JanKoppe's full-sized avatar
🐧
NOOT NOOT!

Jan Koppe JanKoppe

🐧
NOOT NOOT!
View GitHub Profile
@thetechnick
thetechnick / ignition.json
Last active June 22, 2023 17:46
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {
@fnordomat
fnordomat / WIFIonICE.sh
Last active February 22, 2024 11:18
Automatic negotiation of a captive portal: connect to icomera wifi in DB ICE trains (Germany) without having to jump through hoops.
#!/bin/bash
# Deutsche Bahn / icomera AB offers "free wifi" (ESSID: "WIFIonICE") with internet access via
# mobile networks on some high-speed (ICE) trains.
#
# This takes care of the WIFIonICE captive portal.
#
# Please drop me a note if this script is insecure for some reason. It probably is.
#
@smoser
smoser / .gitignore
Last active April 1, 2024 07:38
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@tanaikech
tanaikech / submit.md
Last active April 17, 2024 11:55
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@troyfontaine
troyfontaine / 1-setup.md
Last active April 24, 2024 14:19
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@KowalczykBartek
KowalczykBartek / how to setup secure Dynomite
Last active May 27, 2019 06:39
Dynomite NGINX SSL/TLS Termination
what ?
- As we know Dynomite doesn't support any kind of authentication, so, to make security teams happy, we need to obey this somehow.
One of possibilities is SSL Termination, our Redis client (Jedis for java) will not talk with Dynomite directly but will request NGINX,
NGINX will check client's certificate and if cert is valid, request will be forwarded to Dynomite.
technically how ?
- In normal setup Dynomite requires (for each instance) Dynomite and Redis, in secure setup you will need additionally NGINX,
and this will be only one open port.
With this sample configuration, both Client and Server needs to trust themselves.
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
root /var/www/;
try_files /autodiscover/autodiscover.php =404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param SERVER_ADDR "";
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@mjohnsullivan
mjohnsullivan / generate_cloudfront_signed_cookies.py
Created January 1, 2017 16:34
Python script that generates signed cookies to control access to CloudFront content
#!/usr/bin/env python
"""
Copyright (C) 2017 Matt Sullivan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0