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
@DiegoQueiroz
DiegoQueiroz / query_activedirectory.py
Last active May 8, 2025 06:21
Python-LDAP Query Active Directory Example (with paged results to prevent ldap.SIZELIMIT_EXCEEDED exception)
# -*- coding: utf-8 -*-
# requires python-ldap (usually pip install python-ldap)
# But this package requires OpenLDAP libraries, so it is a pain to install it on Windows.
# So, if you're on Windows, I recomment to use pre-compiled binaries with this command (virtualenv supported):
# pip install https://download.lfd.uci.edu/pythonlibs/h2ufg7oq/python_ldap-3.1.0-cp37-cp37m-win_amd64.whl
import ldap
from ldap.controls import SimplePagedResultsControl
variable "hcloud_token" {
}
provider "hcloud" {
token = "${var.hcloud_token}"
}
resource "hcloud_server" "kube-master" {
name = "kube-master"
image = "ubuntu-18.04"
@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 July 13, 2025 23:16
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 July 15, 2025 17:43
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 May 13, 2025 07:15
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "[email protected]:"]
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;
}