Skip to content

Instantly share code, notes, and snippets.

@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active May 10, 2024 19:51
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@mietzen
mietzen / macos-bitwarden-cli-ssh.md
Last active April 30, 2024 08:52
How to use use Bitwarden CLI for SSH-Keys in macOS

How to use use Bitwarden CLI for SSH-Keys in macOS

If you want to use Touch ID have a look at: How to use use Bitwarden CLI with macOS Touch ID

Wirtten and tested on macOS Ventura

Add SSH-Keys to Bitwarden

Before you can use Bitwarden CLI for your SSH private keys you have to add them to your Bitwarden account. Just create a normal login. The name, username and URI fields doesn't matter for my functions.

@mietzen
mietzen / macos-bitwarden-cli-with-touch-id.md
Last active April 26, 2024 17:57
How to use use Bitwarden CLI with macOS Touch ID

How to use Bitwarden CLI with macOS Touch ID

If you want to use Bitwarden CLI for ssh have a look at: How to use use Bitwarden CLI for SSH-Keys in macOS

Wirtten and tested on macOS Ventura

Configure Touch ID for the sudo command

To allow Touch ID on your Mac to authenticate you for sudo access instead of a password you need to do the following.

@karloskalcium
karloskalcium / run_file_dependent_scripts.py
Last active July 27, 2023 12:41
chezmoi script to run scripts based on dependent files changing
#!/usr/bin/env python3.8
# requires python3.8
from typing import Dict, Final
import hashlib
import os
import subprocess
# Expects a file of the format output by sha256sum (text mode)
CHECKSUM_FILE: Final = ".local_checksum"
@theprojectsomething
theprojectsomething / haproxy-multisite.md
Last active May 7, 2020 15:28
Guide: Multi-site / single-server with Linux Containers + HAProxy

Multi-site / single-server with Linux Containers + HAProxy

The below was completed on a Vultr 1xCPU / 1GB VC2 running Ubuntu 18.04, based on tutorials from Digital Ocean and SSDNodes, alongside various other helpful resources. Instructions do not work on Ubuntu 18.10.

Using this system I currently pay US$5.00 per month to host 2x wordpress sites (1x ecommerce) and 1x static nginx.

If you like the guide, consider signing up to Vultr with my affiliate code. Thanks!

Improvements to the guide (or better explanations) are most appreciated!

@dongsupark
dongsupark / hcloud-ds.tf
Last active February 9, 2021 20:16
Dongsu's terraform config for hetzner cloud
module "hetzner-mycluster" {
#source = "git::https://github.com/kinvolk/typhoon//hetzner-cloud/container-linux/kubernetes?ref=alban/hetzner"
source = "git::git@github.com:kinvolk/spacecraft-typhoon//hetzner-cloud/container-linux/kubernetes?ref=alban/hetzner"
providers = {
aws = "aws.default"
local = "local.default"
null = "null.default"
template = "template.default"
tls = "tls.default"
@thetechnick
thetechnick / ignition.json
Last active June 22, 2023 17:46
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {
@textarcana
textarcana / devops_borat.dat
Created March 7, 2017 09:10
The wisdom of Devops Borat (RIP, may Taichi Ohno himself carry him into Valhalla!) condensed in fortune cookie format without any @ messages included. Just the goofiest random shit :)
I remember very clear I cry when I finish volume 3 of Knuth.
%
I am work on CSS SQL.
%
First sign of depression in devops is denial: you start of ignore Nagios alert.
%
In devops language is not success unless is another language++.
%
In devops you are addict to graph if first thought after orgasm is send duration and intensity to Graphite.
%
# create keytab for radius user
ipa-getkeytab -p 'radius/HOSTNAME' -k /etc/raddb/radius.keytab
chown root:radiusd /etc/raddb/radius.keytab
chmod 640 /etc/raddb/radius.keytab
# make radius use the keytab for SASL GSSAPI
mkdir -p /etc/systemd/system/radiusd.service.d
cat > /etc/systemd/system/radiusd.service.d/krb5_keytab.conf << EOF
[Service]
Environment=KRB5_CLIENT_KTNAME=/etc/raddb/radius.keytab