Skip to content

Instantly share code, notes, and snippets.

View Zenithar's full-sized avatar

Thibault NORMAND Zenithar

View GitHub Profile
@Zenithar
Zenithar / Dockerfile
Last active August 29, 2015 13:57
Nano NGINX
FROM scratch # No parent image
MAINTAINER Thibault NORMAND <me@zenithar.org>
ADD rootfs.tar /
VOLUME ["/var/log/nginx"]
VOLUME ["/www"]
VOLUME ["/etc/nginx/sites-available"]
VOLUME ["/etc/nginx/ssl"]
@Zenithar
Zenithar / keybase.md
Last active August 29, 2015 14:17
keybase.md

Keybase proof

I hereby claim:

  • I am zenithar on github.
  • I am zenithar (https://keybase.io/zenithar) on keybase.
  • I have a public key whose fingerprint is F818 31AF F8EB D14B 8AC8 57F1 E872 2773 022E 7155

To claim this, I am signing this object:

@Zenithar
Zenithar / ldapbinder.go
Created May 20, 2015 07:09
Active Directory Bind authentication with User search (GO)
package main
import (
"fmt"
"log"
"github.com/nmcclain/ldap"
)
var (
@Zenithar
Zenithar / main.go
Last active May 18, 2020 11:08
More secure password storage using HMAC-SHA256 and scrypt
// Inspired by https://blog.filippo.io/salt-and-pepper/
package main
import (
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
"encoding/json"
@Zenithar
Zenithar / dnscrypt-proxy
Last active January 29, 2024 17:42
Unbound + DNSCrypt configuration
DNSCRYPT_LOCALIP=127.0.0.1
DNSCRYPT_LOCALIP2=127.0.0.2
DNSCRYPT_LOCALPORT=9053
DNSCRYPT_RESOLVERPORT=443
DNSCRYPT_USER=nobody
DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.resolver2.dnscrypt.eu
DNSCRYPT_PROVIDER_NAME2=2.dnscrypt-cert.resolver1.dnscrypt.eu
DNSCRYPT_PROVIDER_KEY=3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955
DNSCRYPT_PROVIDER_KEY2=67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66
DNSCRYPT_RESOLVERIP=77.66.84.233
#!/bin/sh
#
# Convert the Yoyo.org anti-ad server listing
# into an unbound dns spoof redirection list.
# Modified by Y.Voinov (c) 2014
#
# Note: Wget required!
#
# Source : https://github.com/jedisct1/unbound/blob/master/contrib/create_unbound_ad_servers.sh
#
@Zenithar
Zenithar / fix.patch
Last active September 30, 2015 10:10 — forked from krobertson/fix.patch
AUR package vmware-patch patch for Workstation 11.1.2 with 4.2 kernel
commit 1fb71794b4d53d203fc64dc5d57baa5850991303
Author: Ken Robertson <ken@invalidlogic.com>
Date: Tue Sep 29 12:58:00 2015 -0700
Applied patches for Workstation 11.1.2 on 4.2 kernel.
Patches were taken from the VMware forums here:
https://communities.vmware.com/thread/517279
@Zenithar
Zenithar / anonymize_nginx.patch
Last active July 7, 2016 20:55
Anonymize NGINX
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 75a4a40..b481fab 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -11,7 +11,7 @@
#define nginx_version 1011002
#define NGINX_VERSION "1.11.2"
-#define NGINX_VER "nginx/" NGINX_VERSION
+#define NGINX_VER "nginx"
@Zenithar
Zenithar / multihash.go
Last active November 29, 2015 19:39
One read multiple hash
package main
import (
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"fmt"
"hash"
"hash/crc32"
@Zenithar
Zenithar / Caddyfile
Last active July 21, 2019 21:06
Hugo + Caddy + Webhook
0.0.0.0:2015
root blog.zenithar.org/public
ext .html
gzip
git github.com/zenithar/zenithar.hugo {
path ../
hook /_admin/github/hook/zenithar.org secret