Skip to content

Instantly share code, notes, and snippets.

data Passport = Passport Word8 Word32
parsePassport :: Parser (Either ByteString Passport)
parsePassport = good <|> bad
where
bad = Left <$> takeWhile (/= '\n') <* endOfLine
good = Right <$> (Passport <$> label <*> body <* endOfLine)
where
set nocompatible " be iMproved, required
set backspace=2
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: your-namespace
namespace: your-namespace
rules:
- apiGroups:
- ""
resources:
- pods
@chemist
chemist / kubernetes_add_service_account_kubeconfig.sh
Created March 4, 2020 07:57 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@chemist
chemist / gpg-ssh-setup.md
Created December 24, 2021 05:26 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.