Skip to content

Instantly share code, notes, and snippets.

@asksven
asksven / gist:08c4c0bb66d6c451c3c0fe90eae4f90a
Last active January 10, 2017 21:10
Ubuntu Server base install
apt-get update && apt-get upgrade
apt-get install openssh-server
# dyndns
apt-get install ddclient
# do/re-do the settings: dpkg-reconfigure ddclient
# 2FA
sudo apt-get install libpam-google-authenticator
# and follow http://askubuntu.com/questions/609117/how-to-setup-two-factor-authentication-in-ubuntu-for-ubuntu-users-using-google-a
@asksven
asksven / gist:8a00af6201a52436c4f2d91083aca1fc
Last active February 27, 2017 11:37
Setup Windows 10 ubuntu subsystem
sudo apt-get update && sudo apt-get upgrade
# we want to use nodejs 6
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y git nodejs-legacy npm
npm config set unsafe-perm true
sudo npm install -g @angular/cli # note: the angular-cli crashes at creating projects with "ng new" so you will have to manually run "npm install" after the project has been created
#add docker client (to be run against e.g. Docker for windows)
sudo apt-get install -y docker.io
# Extensions to install
AutoImport
PowerShell
# Bash as terminal
File -> Preferences -> Settings
and add
```
{
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
@asksven
asksven / unison.md
Last active October 17, 2024 10:49
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>

Tips for faster feedback loops

lint your Dockerfile

  1. Install the hadolint binary: https://github.com/hadolint/hadolint/releases
  2. In VSCode install the hadolint extension
  3. Open a Dockerfile in VSCode and enjoy
  4. Add a lint job to your pipeline
lint_dockerfile:
hostname: k8s-rancher-vm
rancher:
network:
interfaces:
eth0:
dhcp: true
gateway: 192.168.178.1
docker:
engine: docker-18.09.6
@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:
@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:
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.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