Skip to content

Instantly share code, notes, and snippets.

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@phortuin
phortuin / signing-git-commits.md
Last active May 14, 2024 15:02
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
@cmer
cmer / haproxy.cfg
Last active April 15, 2024 09:54
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
@otsuka752
otsuka752 / list_ns-of-R53
Created August 30, 2019 19:40
list of NS(NameServer) and IPAddress of Amazon Route 53
#0 ns-0.awsdns-00.com. 205.251.192.0
#1 ns-1.awsdns-00.com. 205.251.192.1
#2 ns-2.awsdns-00.com. 205.251.192.2
#3 ns-3.awsdns-00.com. 205.251.192.3
#4 ns-4.awsdns-00.com. 205.251.192.4
#5 ns-5.awsdns-00.com. 205.251.192.5
#6 ns-6.awsdns-00.com. 205.251.192.6
#7 ns-7.awsdns-00.com. 205.251.192.7
#8 ns-8.awsdns-01.com. 205.251.192.8
#9 ns-9.awsdns-01.com. 205.251.192.9
@rhuancarlos
rhuancarlos / sources.list
Created October 5, 2018 03:22
Ubuntu 18.04 Bionic default /etc/apt/sources.list
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@roberto
roberto / _flash_messages.html.erb
Created August 13, 2012 22:47
Rails flash messages using Twitter Bootstrap
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@htruong
htruong / raspberry-pi-chroot-armv7-qemu.md
Last active June 18, 2023 18:00 — forked from jkullick/raspberry-pi-chroot-armv7-qemu.md
Chroot into Raspberry Pi ARMv7 Image with Qemu
# raspbian stretch lite on ubuntu

### You can write the raspbian image onto the sd card,
# boot the pi so it expands the fs, then plug back to your laptop/desktop
# and chroot to it with my script 
# https://gist.github.com/htruong/7df502fb60268eeee5bca21ef3e436eb
# sudo ./chroot-to-pi.sh /dev/sdb
# I found it to be much less of a pain in the ass and more reliable
# than doing the kpartx thing
@dmahugh
dmahugh / comparision.py
Created May 23, 2017 17:21
comparison of asynchronous HTTP requests (aiohttp/asyncio) and traditional sequential requests (with Requests library)
"""Comparison of fetching web pages sequentially vs. asynchronously
Requirements: Python 3.5+, Requests, aiohttp, cchardet
For a walkthrough see this blog post:
http://mahugh.com/2017/05/23/http-requests-asyncio-aiohttp-vs-requests/
"""
import asyncio
from timeit import default_timer
@ccssmnn
ccssmnn / README.md
Created February 9, 2020 12:43
Raspberry Pi 4 + Theia IDE = ❤️

Set up Theia IDE on Raspberry Pi 4

Requirements

Install node version 10 and yarn:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
nvm install 10
npm install -g yarn
@moylette
moylette / mandatory.yaml
Created March 7, 2019 01:02
Kubernetes configuration to get Nginx Ingress running on a Raspberry Pi cluster.
---
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
---
apiVersion: extensions/v1beta1
kind: Deployment