Skip to content

Instantly share code, notes, and snippets.

Niels Hofmans hazcod

Block or report user

Report or block hazcod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
resource "scaleway_security_group" "swarm_managers" {
name = "swarm_managers"
description = "Whitelist HTTP(S) and SSH traffic"
inbound_default_policy = "drop"
outbound_default_policy = "accept"
resource "scaleway_security_group_rule" "ssh_accept" {
security_group = "${}"
hazcod / cloudSettings
Last active Aug 16, 2019
My VS Code preferences.
View cloudSettings
hazcod / cloudbuild.yaml
Last active Jun 25, 2019
Clean container registry images in Google Cloud Build step.
View cloudbuild.yaml
_IMG_KEEP: "3"
- name: ''
entrypoint: 'bash'
- '-c'
hazcod / go-alpine-protobuf.Dockerfile
Last active Jun 24, 2019
Use protobuf on golang alpine Docker image.
View go-alpine-protobuf.Dockerfile
FROM golang:alpine
RUN apk add --no-cache protobuf git \
&& go get \
&& cp /go/bin/protoc-gen-go /usr/bin/
# e.g. find proto -type f -iname '*.proto' -exec protoc -I proto/ --go_out go/ {} \;
hazcod /
Last active May 13, 2019
Remove mapping file references using (bsd) sed and find.
find css js -type f \( -iname '*.css' -o -iname '*.js' \) -exec sed -i '' -e 's/sourceMappingURL=[^ ]*\.map//g' {} +
View pprof-cpu-svg.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
hazcod /
Created Feb 5, 2019
Bash snippet to generate a 32-character password with strong entropy.
#!/usr/bin/env sh
LC_ALL=C tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/urandom | head -c 32 ; echo
hazcod / btt-work.bttpreset
Created Aug 30, 2018
My BetterTouchTool TouchBar config.
View btt-work.bttpreset
"BTTPresetName" : "work",
"BTTGeneralSettings" : {
"disableScrollingIf3" : true,
"BTTForceNormalClickPressure5F" : 200,
"disableScrollingIf2" : true,
"BTTDidRegisterForUpdateStats" : "2.608",
"BTTShowControlStrip" : false,
"BTTShowControlStripItem" : true,
"BTTForceForceClickPressure5F" : 600,
hazcod / feature-policy
Created Aug 24, 2018
Full Feature-Policy header
View feature-policy
Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; animations 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; image-compression 'none'; legacy-image-formats 'none'; magnetometer 'none'; max-downscaling-image 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; unsized-media 'none'; usb 'none'; vertical-scroll 'none'; vr 'none'";
hazcod / logger.go
Last active Aug 27, 2018
Simple logger that listens for UNIX datagram message and prints them to stdout. We don't like syslog-ng in our postfix container!
View logger.go
package main
import (
func println(msg string) {
You can’t perform that action at this time.