Skip to content

Instantly share code, notes, and snippets.

@timstott
timstott / install.sh
Last active December 22, 2023 08:28 — forked from mx00s/install.sh
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
# Original https://gist.github.com/mx00s/ea2462a3fe6fdaa65692fe7ee824de3e
#
# NixOS install script synthesized from:
#
# - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings)
# - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs)
# - NixOS Manual (https://nixos.org/nixos/manual/)
#
@timstott
timstott / circleci_fetch_artifact
Created March 23, 2021 15:45
Fetch/Download specific artifact from CircleCI build
#!/usr/bin/env bash
set -euo pipefail
log_debug() {
local blue="\e[34m"
local default="\e[39m"
# ISO8601 timestamp + ms
local timestamp=$(date +%FT%T.%3NZ)
echo -e "${blue}${timestamp} [debug] $1${default}" 1>&2
@timstott
timstott / use-password-store-with-forge.org
Last active February 2, 2024 11:31
Use password-store (aka pass) with forge and github-review

Use password-store (aka pass) with forge and github-review

We can use pass as an emacs auth-source backend to access credentials.

Add auth-source-pass (included with emacs 26) to your emacs config:

(require 'auth-source-pass)
(auth-source-pass-enable)

This prepends password-store to the variable auth-sources.

@timstott
timstott / partition-nixos-zfs-swap-luks.sh
Last active June 7, 2021 22:29
discourse.nixos.org/t/nixos-on-luks-encrypted-partition-with-zfs-and-swap/6873 - original script
#!/usr/bin/env bash
# NixOS install with encrypted root and swap
#
# sda
# ├─sda1 BOOT
# └─sda2 LINUX (LUKS CONTAINER)
# └─cryptroot LUKS MAPPER
# └─cryptroot1 SWAP
# └─cryptroot2 ZFS
@timstott
timstott / shell.nix
Created September 25, 2019 21:40
Ruby project nix shell
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
name = "hello-world-ruby-v1";
buildInputs = [
ruby_2_6
];
@timstott
timstott / disable-repaint-with-ctrl-l.patch
Created July 6, 2019 11:33
disable mosh repaint (CTRL-L) nixpkgs overlay
diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc
index 8523f9c..8cfbdae 100644
--- a/src/frontend/stmclient.cc
+++ b/src/frontend/stmclient.cc
@@ -373,9 +373,6 @@ bool STMClient::process_user_input( int fd )
lf_entered = ( (the_byte == 0x0A) || (the_byte == 0x0D) ); /* LineFeed, Ctrl-J, '\n' or CarriageReturn, Ctrl-M, '\r' */
- if ( the_byte == 0x0C ) { /* Ctrl-L */
- repaint_requested = true;
@timstott
timstott / configuration.nix
Last active January 21, 2020 22:10
Convert a machine provisioned by NixOps to standalone NixOS (reddit https://redd.it/agpq3o)
{ config, lib, pkgs, ... }: {
config = {
boot.kernelModules = [];
networking = {
extraHosts = ''
xxx.xxx.xxx.xxx bob-remote bob-remote-unencrypted
127.0.0.1 bob-remote-encrypted
'';
firewall.trustedInterfaces = [];
publicIPv4 = "xxx.xxx.xxx.xxx";
@timstott
timstott / howtovim.md
Last active May 21, 2019 14:26
How To Vim

Argument list

Add to the argument list

command outcome
:args ag -l spec_helper add command result to args list

Operate on the argument list

@timstott
timstott / README.md
Created August 15, 2017 19:11
Run Ethereum Parity with Docker

Instructions

docker-compose up -d
docker-compose exec parity /parity/parity signer new-token | grep http
# browse to url
@timstott
timstott / keybase.md
Created May 26, 2017 07:46
Keybase Proof

Keybase proof

I hereby claim:

  • I am timstott on github.
  • I am timstott (https://keybase.io/timstott) on keybase.
  • I have a public key whose fingerprint is 9B24 48CD EA77 B493 2F42 24B5 0CDE 05FC 2683 594F

To claim this, I am signing this object: