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 / 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
@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 / 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 / mongotestrunner.py
Created September 21, 2012 06:23
Django, MongoDB, and MongoEngine: A custom TestRunner managing mongo test database creation and cleanup.
#coding: utf-8
from django.test.simple import DjangoTestSuiteRunner
from nose.plugins.skip import SkipTest
from mongoengine.python_support import PY3
from mongoengine import connect
try:
from django.test import TestCase
from django.conf import settings
@snormore
snormore / mongotestcase.py
Created September 29, 2012 02:59
Django, MongoDB, and MongoEngine: A custom TestCase managing test database creation and cleanup between test methods.
#coding: utf-8
from nose.plugins.skip import SkipTest
from mongoengine.python_support import PY3
from mongoengine import connect
try:
from django.test import TestCase
from django.conf import settings
except Exception as err:
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