Skip to content

Instantly share code, notes, and snippets.

@timstott
timstott / circleci_fetch_artifact
Created Mar 23, 2021
Fetch/Download specific artifact from CircleCI build
View circleci_fetch_artifact
#!/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 Jul 9, 2020
Use password-store (aka pass) with forge and github-review
View use-password-store-with-forge.org

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 Jun 7, 2021
discourse.nixos.org/t/nixos-on-luks-encrypted-partition-with-zfs-and-swap/6873 - original script
View partition-nixos-zfs-swap-luks.sh
#!/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 Sep 25, 2019
Ruby project nix shell
View shell.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
name = "hello-world-ruby-v1";
buildInputs = [
ruby_2_6
];
@timstott
timstott / disable-repaint-with-ctrl-l.patch
Created Jul 6, 2019
disable mosh repaint (CTRL-L) nixpkgs overlay
View disable-repaint-with-ctrl-l.patch
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 Jan 21, 2020
Convert a machine provisioned by NixOps to standalone NixOS (reddit https://redd.it/agpq3o)
View configuration.nix
{ 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";
View howtovim.md

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 Aug 15, 2017
Run Ethereum Parity with Docker
View README.md

Instructions

docker-compose up -d
docker-compose exec parity /parity/parity signer new-token | grep http
# browse to url
View keybase.md

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:

View tmux.md

Move current windows to x position move-window -t 0

Access tmux clipboard tmux show-buffer | jq . -S