Skip to content

Instantly share code, notes, and snippets.


Jan Koppe JanKoppe

View GitHub Profile
kralo / IKEV2C_0USER.ini
Last active Oct 21, 2020
[HOWTO] configuration example for lancom host to ubuntu 16.04 vpn client
View IKEV2C_0USER.ini
blha303 / 1001.conf
Last active Jul 2, 2019
Asterisk context
View 1001.conf
exten => _X.,1,Set(CALLERID(name)=
exten => _X.,n,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(1001-recordtype) ; "Enter record type on your phone keypad, followed by the hash key. Press 1 to go to next character"
exten => _X.,n,Read(recordtype,,,si,)
exten => _X.,n,Playback(1001-domain) ; "Enter domain name to retrieve record, followed by the hash key"
exten => _X.,n,Read(domain,,,si,)
exten => _X.,n,Set(RECORD="${SHELL(/usr/bin/ "${recordtype}")}")
exten => _X.,n,Set(ADDR="${SHELL(/usr/bin/ "${domain}")}")
variable "hcloud_token" {
provider "hcloud" {
token = "${var.hcloud_token}"
resource "hcloud_server" "kube-master" {
name = "kube-master"
image = "ubuntu-18.04"
thetechnick / ignition.json
Last active Sep 22, 2020
Hetzner Cloud terraform coreos install
View ignition.json
"ignition": {
"version": "2.0.0",
"config": {}
"storage": {
"systemd": {},
"networkd": {},
"passwd": {
smoser / .gitignore
Last active Sep 30, 2020
cloud-init ubuntu nocloud example with network config
View .gitignore
tanaikech /
Last active Oct 20, 2020
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


filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "${fileid}"
KowalczykBartek / how to setup secure Dynomite
Last active May 27, 2019
Dynomite NGINX SSL/TLS Termination
View how to setup secure Dynomite
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 / .gitconfig
Last active Oct 26, 2020
git global url insteadOf setup
View .gitconfig
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url ""]
insteadOf = git://github
View nginx.autodiscover.example.conf
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 /
Last active Oct 28, 2020
Linux kernel initialization, translated to bash
# 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 <>
# 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
You can’t perform that action at this time.