Skip to content

Instantly share code, notes, and snippets.

View dirsigler's full-sized avatar

Dennis Irsigler dirsigler

View GitHub Profile
@phortuin
phortuin / signing-git-commits.md
Last active July 15, 2024 08:53
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
@ramimac
ramimac / Cloud Security Orienteering Checklist.md
Last active April 24, 2024 03:54
A Checklist of Cloud Security Orienteering

Cloud Security Orienteering: Checklist
by Rami McCarthy
via TL;DR sec

How to orienteer in a cloud environment, dig in to identify the risks that matter, and put together actionable plans that address short, medium, and long term goals.

Based on the Cloud Security Orienteering methodology.

Checklist

@rossedman
rossedman / main.tf
Last active March 7, 2024 14:00
Scale homelab into cloud with Tailscale, Terraform and cloud-init
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
}
}
}
provider "digitalocean" {
}
@berkant
berkant / cloud-init.cfg
Last active April 26, 2024 17:58
Cloud-init config to set up my Ubuntu dev machine.
## template: jinja
#cloud-config
{% if v1.distro_release == 'focal' %}
users:
- name: berkant
shell: /usr/bin/bash
ssh_import_id: gh:berkant
sudo: ALL=(ALL:ALL) NOPASSWD:ALL
@vishnuhd
vishnuhd / mysql-client-k8s.md
Created August 22, 2019 13:21
mysql-client in Kubernetes to test your connection to mysql server

mysql-client in Kubernetes to test your connection to mysql server

kubectl run mysql-client --image=mysql:5.7 -it --rm --restart=Never -- /bin/bash

mysql -h mysql-service -uroot -proot_password -e 'SHOW databases;'

OR

mysql -h mysql-service -uroot -proot_password

@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active July 22, 2024 20:45
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@jessfraz
jessfraz / boxstarter.ps1
Last active July 7, 2024 22:46
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@jarthod
jarthod / server_benchmark.md
Last active January 6, 2024 10:05
Server benchmark

Results

Server Price* CPU (1 thread) CPU (4 threads) IO
Scaleway Start1-XS
Atom C3955, 25G NVMe
$4 21 sec
P₉₅ = 2.1ms
21 sec
P₉₅ = 14ms
🚗 653 IO/s, 10 Mb/sec
P₉₅ = 0.40ms
Scaleway VC1-S
Atom C2750, 50G SSD
$4 46 sec ⚠️
P₉₅ = 4.6ms
23 sec
P₉₅ = 14ms
🚲 289 IO/s, 4.5 Mb/sec
P₉₅ = 0.39ms
Hetzner CPX11
AMD EPYC, 40G SSD
$5 20 sec
P₉₅ = 3.2ms
9.6 sec
P₉₅ = 11ms
✈️ 3656 IO/s, 57 Mb/sec
P₉₅ = 0.29ms
Hetzner CX21
Intel Xeon, 40G SSD
$6 24 sec
P₉₅ = 2.8ms
12.5 sec
P₉₅ = 11ms
🚤 1946 IO/s, 30 Mb/sec
P₉₅ = 0.97ms
AWS t2.micro 1G*Intel E5-2676 v3 2.4
@johand
johand / mpd.md
Created March 28, 2016 05:01
mpd + ncmpcpp + pulseaudio with systemd in archlinux

Installation

pacman -S mpd ncmpcpp

MPD

copy the example configuration in mpd.conf

# cp /usr/share/doc/mpd/mpdconf.example /etc/mpd.conf