Skip to content

Instantly share code, notes, and snippets.

If 2fa is enabled on github switch to ssh instead of https on linux
1. generate an ssh keypair on your linux box
ssh-keygen -t {rsa|dsa}
2. add the public key to github: profile - settings - ssh keys
3. switch from https to ssh
Check your repo remote:
tap "adoptopenjdk/openjdk"
tap "fairwindsops/tap"
tap "hashicorp/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "int128/kubelogin"
brew "python@3.11"
brew "ansible"
brew "python@3.10"
import click
# Group for 'project' commands
@click.group()
def project():
pass
# Project commands
@project.command()
def list():
@asksven
asksven / unison.md
Last active October 16, 2023 20:45
Configure unison for continuous sync

Configure unison for bi-directional sync

1. On client

  1. Create a profile (~/.unison/bidirsync.prf):
# Unison preferences
label = bi-directonal sync with server
root = /home/<user>/git
root = ssh://<user>@<server-name>//home/<user>/sync/git
sshargs = -oIdentityFile=/home/<user>/.ssh/<privkey-name>
@asksven
asksven / backup-cronjob-config.yaml
Created April 2, 2023 14:49
Backup / Restore and error handling
apiVersion: v1
kind: ConfigMap
metadata:
name: backupcronjob-config
data:
backup.sh: |
#!/bin/bash
# Handler will be called if something fails
handler()
@asksven
asksven / deployment.yaml
Created March 19, 2023 16:22
simple statuspage for kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 2
from os import environ
from jira import JIRA
# using jira : pip install jira==3.1.1
# Following env vars must be SET
# JIRA_URL
# JIRA_ACCESS_TOKEN
# JIRA_PROJECT
@asksven
asksven / deployment-final.yaml
Last active April 13, 2020 14:28
securing-kubernetes-configuration-result
kind: List
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: status
spec:
@asksven
asksven / deployment-start.yaml
Last active April 13, 2020 14:27
securing-kubernetes-configuration-starting-point
kind: List
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: status
spec:
hostname: k8s-rancher-vm
rancher:
network:
interfaces:
eth0:
dhcp: true
gateway: 192.168.178.1
docker:
engine: docker-18.09.6