Skip to content

Instantly share code, notes, and snippets.

http {
geo $filthy_ipv4 {
::/0 0;
0.0.0.0/0 1;
}
server {
if ($filthy_ipv4) {
return 400 "legacy internet not supported. please use ipv6";
}
}
@phille97
phille97 / k8s_ssh_gateway.go
Created November 29, 2018 08:16
Warning: No authentication, only to be used as proof of concept
package main
import (
"fmt"
"io"
"log"
"os"
"os/exec"
"syscall"
"unsafe"
package main
import (
"github.com/gliderlabs/ssh"
"io"
"crypto/sha256"
"encoding/hex"
"bufio"
"errors"
"time"
@phille97
phille97 / gol.go
Created June 23, 2018 13:48
multi-threaded game of life
package main
import (
"fmt"
"time"
"sync"
)
var width, height int
var board [][]bool
@phille97
phille97 / keybase.md
Created November 28, 2017 16:56
Verifying keybase.io

Keybase proof

I hereby claim:

  • I am phille97 on github.
  • I am phille97 (https://keybase.io/phille97) on keybase.
  • I have a public key whose fingerprint is 7833 4978 D4D0 3AD9 9E32 BE7D F194 58FE 9307 C913

To claim this, I am signing this object:

@phille97
phille97 / 0x9307C913.pub.asc
Last active January 20, 2021 12:08
0x9307C913
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFlxFPgBEACeC4r5Xb6vd68+JmL3hp1VbD8I+I4Dd8E6x5tEtEPJ0jYC8ovg
LdOxQU62ujMQfVZhGR3WYHJR9+7HpKzKp5swkWfuic0kwaviHldWVn6/dfW7tbNl
Q31su82MN05SHBbGVhTtwAzdhS3cjCrP6K2M47CyBbiqgcjREgOVpjq61Opk5H6g
zFrOXsQCSyOtryZQLOCzzPbjrPoaLdv0czWuew6aWCYTyfOX4KW9oPe1LZIdwRyV
F1eJ9AGESk7GioO30Gemi8FSga0fO9ev6nhDncOPYxlN/49i9e5PQHJ1xdxexUhK
GMjbmcmgERCXj9LEucnTKfKa4RJ6FLtDbYWp17f8wQGlL5lQwGFyNBgo4LGVLs0E
QlAB4VBMW1HiJ43Mx1sx7Ft9NIfEeIFw8mEEhJn5mZ0aAvu6DDN89dTLUn3/8J1p
OakDUX9Zy+G7Ocmuu0WIOcOW763zPRzliZUDU/1GnaJPW+XqZhq0hy7yB4x7li+4
@phille97
phille97 / minicall.sh
Last active November 28, 2017 16:41
Minicall-POCSAG1200
# Freq: 161.437MHz Bandwidth: 14.5KHz
nc -l -u 127.0.0.1 -p 7355 | sox -t raw -esigned-integer -b16 -r 48000 - -esigned-integer -b16 -r 22050 -t raw - | multimon-ng -t raw -a SCOPE -a POCSAG512 -a POCSAG1200 -p -
@phille97
phille97 / test_woo_api.php
Created September 5, 2016 14:58
Show that Woo API works
<?php
// Consumer Key
$ck = 'ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Consumer Secret
$cs = 'cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// URL
$url = "http://example.com/wp-json/wc/v1/products";
@phille97
phille97 / docker-compose.yml
Created May 11, 2016 13:48
Shared data directory with dockers
web:
build: ./web
ports:
- 80:80
links:
- mysql:mysql_host
# Volumes is a list of /path/on/host:/path/on/docker
# Where the first path is the path on the composer
volumes:
- /home/myname/projekt:/var/www