Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ymatsiuk
ymatsiuk / flake.nix
Created April 5, 2024 07:53
Nix develop example
# Run me:
# ❯ nix develop .#work -c mysql --version
# mysql Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using readline 5.1
# ❯ nix develop .#fun -c vault --version
# Vault v1.15.6 (615cf6f1dce9aa91bc2035ce33b9f689952218f0), built 2024-02-28T17:07:34Z
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active April 22, 2024 16:22
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 10, 2024 22:23
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 3, 2024 14:12
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.

@yannickjones
yannickjones / sre-interview-questions.txt
Created November 17, 2022 15:15
SRE Interview questions
- Intros + background overview
- API service in a k8s clusters
+ Single region HA from starting with a single pod deployment?
+ API talks to MongoDB outside of the cluster
+ Describe KPIs for this application?
+ Describe how you would make this service multi region in AWS at a high level?
- What are the three types of observability data?
- How would you troubleshoot a k8s pod stuck in a crashloopbackoff state?
- How can you expose a k8s application publicly using AWS and EKS?
- How can you provide a file to a pod in k8s without building it into your application image?
@spinus
spinus / falcon.nix
Created June 15, 2022 10:47
crowdstrike falcon
{pkgs?import <nixpkgs> {}}:
with pkgs;
stdenv.mkDerivation {
name = "falcon-sensor";
version = "4.18.0-6402";
arch = "amd64";
src = ./falcon-sensor_6.34.0-13108_amd64.deb;
nativeBuildInputs = [ dpkg autoPatchelfHook zlib pkgs.libnl pkgs.openssl ];
@klDen
klDen / falcon-default.nix
Last active April 5, 2024 17:06 — forked from ravloony/falcon-default.nix
Falcon package
{ stdenv, lib, pkgs, dpkg,
openssl, libnl, zlib,
fetchurl, autoPatchelfHook, buildFHSUserEnv, writeScript, ... }:
let
@daymien
daymien / hetzner-dedicated-wipe-and-install-nixos-luks-raid-lvm.sh
Last active December 14, 2023 17:55
Insall NixOS form hetzner rescue system with LUKS RAID1 LVM
#!/usr/bin/env bash
# Installs NixOS on a Hetzner server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script wherever FIXME is present
#
# Usage:
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 21, 2024 15:26
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@bitonic
bitonic / configuration.nix
Last active March 2, 2024 12:58
NixOS configuration for a remote ZFS server on Hetzner
# Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner.
# See <https://mazzo.li/posts/hetzner-zfs.html> for more information.
{ config, pkgs, ... }:
let
# Deployment-specific parameters -- you need to fill these in where the ... are
hostName = "...";
publicKey = "...";
# From `ls -lh /dev/disk/by-id`