Skip to content

Instantly share code, notes, and snippets.

View sirhopcount's full-sized avatar

Adrian van Dongen sirhopcount

View GitHub Profile
@sirhopcount
sirhopcount / create_labels.sh
Created November 30, 2017 14:07 — forked from omegahm/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@sirhopcount
sirhopcount / sysctl.conf
Created November 28, 2017 09:44 — forked from janus57/sysctl.conf
Default /etc/sysctl.conf under Debian 8 (aka Jessie)
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

Keybase proof

I hereby claim:

  • I am sirhopcount on github.
  • I am sirhopcount (https://keybase.io/sirhopcount) on keybase.
  • I have a public key whose fingerprint is E627 113D 9BA1 6C88 86FB 7AFC F688 D69D 8082 512C

To claim this, I am signing this object:

@sirhopcount
sirhopcount / README.md
Created August 14, 2017 09:57 — forked from wnoguchi/README.md
Preseed Recipe: Basic Configuration

Ubuntu Preseed Recipe: Basic

System Requirements

  • Ubuntu Server 12.04.3 LTS AMD64
  • HDD: 2TB Single
  • Mem: 16GB

References

#!/bin/bash
# configures bash prompt based on current kubernetes cluster context and namespace
# based on https://pracucci.com/display-the-current-kubelet-context-in-the-bash-prompt.html
__kube_ps1()
{
CONTEXT=$(kubectl config view | grep current-context | awk '{ print $NF }' | awk -F '.' '{ print $1 }')
NS=$(kubectl config view $(kubectl config current-context) | grep namespace | awk '{ print $2 }')
if [ -n "$CONTEXT" ]; then
echo "[${CONTEXT}][${NS}]"
@sirhopcount
sirhopcount / README.md
Created June 8, 2017 10:59 — forked from dbiesecke/README.md
Simple gist to show the aptly magic :)

Aptly Real-Live example

Install Repo

$ echo 'deb http://repo.aptly.info/ squeeze main' > /etc/apt/sources.list.d/aptly.list && wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -

$ apt-get update && apt-get install -y -f aptly

@sirhopcount
sirhopcount / var-lib-etcd2.mount
Created April 13, 2017 13:09 — forked from mgoodness/var-lib-etcd2.mount
Systemd unit file to mount EBS volume to /var/etc/data
[Unit]
Description=Mount EBS volume at /var/lib/etcd2
Requires=format-etcd-ebs.service
After=format-etcd-ebs.service
Before=etcd2.service
[Mount]
DirectoryMode=0777
Type=ext4
What=/dev/xvdb
@sirhopcount
sirhopcount / minio-distributed-statefulset.yaml
Created February 22, 2017 08:34 — forked from nitisht/minio-distributed-statefulset.yaml
Create a distributed Minio deployment based on StatefulSets
apiVersion: v1
kind: Service
metadata:
name: minio
labels:
app: minio
spec:
clusterIP: None
ports:
- port: 9000
@sirhopcount
sirhopcount / authentication.rb
Created October 21, 2016 05:08 — forked from theCrab/authentication.rb
A Hanami Framework authentication based on JSON Web Tokens.
# lib/authentications/authentication.rb
# @api auth
# Authentication base class
#
module Authentication
def self.included(base)
base.class_eval do
before :authenticate!
expose :current_user
@sirhopcount
sirhopcount / README.md
Created October 18, 2016 07:47 — forked from lusis/README.md
terraform template to generate serverspec properties

This uses terraform's template_file resource to generate a yaml properties file for serverspec to use.

  • create the Rakefile in your terraform project root
  • create a spec directory and put spec_helper.rb in it
  • create the templates/properties.tmpl.yml file
  • create the serverspec.tf
  • terraform apply

tests

Tests will be matched based on roles defined for a given node.