Skip to content

Instantly share code, notes, and snippets.

@snormore
snormore / signing-git-commits.md
Last active May 4, 2024 19:33 — forked from phortuin/signing-git-commits.md
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@snormore
snormore / cilium-hostport-portmp-cni-config.md
Last active July 26, 2019 00:42
Enable hostPort mapping in Cilium via CNI config.

We 1. tell Cilium not to drop it's own config via the CILIUM_CNI_CONF env, and 2. Update the postStart lifecycle hook where Cilium does a /cni-install.sh already, to include the writing of a CNI config enabling portmap.

kubectl edit ds cilium -n kube-system

Add this under the container env

# We drop our own CNI config with portmap enabled, so this tells
# Cilium not to write one.
@snormore
snormore / kind-circleci-config.yaml
Last active February 16, 2023 09:57
Golang with kind (Kubernetes-in-Docker) on CircleCI
version: 2
jobs:
build:
machine: true
steps:
- checkout
- run:
name: Install KinD
command: |
curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/0.0.1/kind-linux-amd64
@snormore
snormore / README.md
Last active February 29, 2024 06:29
Deploying a web app to Kubernetes with SSL using Let's Encrypt via cert-manager and nginx-ingress.

Deploying a web app to Kubernetes with SSL using Let's Encrypt via cert-manager and nginx-ingress

Spin up a Kubernetes cluster

You can do this with MiniKube for development and testing, or Google Cloud's GKE for the real thing.

MiniKube

# Make sure you have MiniKube installed and it's the latest
0 tench, Tinca tinca
1 goldfish, Carassius auratus
2 great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias
3 tiger shark, Galeocerdo cuvieri
4 hammerhead, hammerhead shark
5 electric ray, crampfish, numbfish, torpedo
6 stingray
7 cock
8 hen
9 ostrich, Struthio camelus
@snormore
snormore / Dockerfile
Created December 27, 2016 01:20 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@snormore
snormore / travisci-flowdock.md
Last active January 1, 2016 01:29
TravisCI Flowdock notificaitons for public repo and private flowdock rooms

TravisCI Flowdock notifications for public repo and private flowdock rooms

notifications:
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install git-core git-gui git-doc redis-server mysql-server mongodb postresql ruby-full libmysqlclient15-dev libxml2-dev libxslt-dev python-setuptools python-dev
#install pip and virtualenv
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
#setup virtualenvs
mkdir ~/virtualenvs
@snormore
snormore / go-test.sh
Last active December 16, 2015 05:29
Run go tests for every sub-package of the Go project.
#!/bin/bash
CONFIG_PATH="`pwd`/config"
CODE_DIR="`pwd`/gonode/src/go.io"
cd $CODE_DIR
for pkg in $(find ./*/ -type d)
do
echo "Running '${pkg:2}' tests..."
cd "$CODE_DIR/$pkg"
export CONFIG_PATH=$CONFIG_PATH
export GO_ENV="test"
@snormore
snormore / logstash-install.sh
Last active December 15, 2015 07:49
Install logstash in Linux
#!/bin/bash
# http://rdstash.blogspot.ca/2013/01/installing-logstash-as-syslog-server-on.html
sudo apt-get install git rubygems -y
sudo gem install fpm
#git clone https://github.com/Yuav/logstash-packaging.git --depth=1
#git clone https://github.com/jbraeuer/logstash-packaging
git clone https://github.com/snormore/logstash-packaging
cd logstash-packaging
./package.sh
sudo dpkg -i logstash_1.1.9.deb