Skip to content

Instantly share code, notes, and snippets.

@pbrisbin
pbrisbin / refresh.md
Last active June 11, 2024 15:07
Refreshing GPG keys

These are my own notes for my re-expiration of GPG keys.

1- Mount flashdrive

sudo cryptsetup open /dev/sdb1 --type=tcrypt flashdrive
sudo mkdir -p /mnt/flashdrive
sudo mount /dev/mapper/flashdrive /mnt/flashdrive
export GNUPGHOME=/mnt/flashdrive/gnupg
@pbrisbin
pbrisbin / actual.txt
Created March 24, 2022 13:32
Stack build with touched artifacts
Version 2.7.5, Git revision ba147e6f59b2da75b1beb98b1888cce97f7032b1 x86_64 hpack-0.34.4
2022-03-24 09:08:46.951150: [debug] Checking for project config at: /home/patrick/code/freckle/hspec-junit-formatter/stack.yaml
2022-03-24 09:08:46.951255: [debug] Loading project config file stack.yaml
2022-03-24 09:08:46.954176: [debug] (SQL) SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2022-03-23 13:08:46.954156978 UTC]
2022-03-24 09:08:46.954530: [debug] Using package location completions from a lock file
2022-03-24 09:08:46.956786: [debug] Loaded snapshot from Pantry database.
2022-03-24 09:08:47.095209: [debug] RawSnapshotLayer {rslParent = RSLCompiler (WCGhc (mkVersion [8,10,4])), rslCompiler = Nothing, rslLocations = [RPLIHackage AC-Angle-1.0@sha256:e1ffee97819283b714598b947de323254e368f6ae7d4db1d3618fa933f80f065,544 (Just (TreeKey 7edd1f1a6228af27c0f0ae53e73468c1d7ac26166f2cb386962db7ff021a2714,210)),RPLIHackage ALUT-2.4.0.3@sha256:ab8c2af4c13bc04c7
-- Form 1
-----------------------------------------------------------------------------------------
data Job arg = Job
{ jobJid :: JobId
, jobJobtype :: String
, jobArgs :: NonEmpty arg
, jobRetry :: Maybe Int
, jobQueue :: Maybe Queue
, jobAt :: Maybe UTCTime
@pbrisbin
pbrisbin / broken-index.js
Created April 7, 2020 19:23
logdna-cloudwatch repro
// External Libraries
const agent = require("agentkeepalive");
const asyncRetry = require("async").retry;
const request = require("request");
const zlib = require("zlib");
// Constants
const MAX_LINE_LENGTH = parseInt(process.env.LOGDNA_MAX_LINE_LENGTH) || 32000;
const MAX_REQUEST_TIMEOUT_MS =
parseInt(process.env.LOGDNA_MAX_REQUEST_TIMEOUT) || 30000;
@pbrisbin
pbrisbin / gpg-extend-expiration.md
Created March 17, 2020 18:53
Extending the expiration of my Signing subkey(s)

Extending subkey expiration

  1. Mount master keys flashdrive

    truecrypt
    
  2. Extend expiry of all keys

#!/bin/sh
amixer_() {
# Workaround
amixer -c 0 sset Headphone unmute
amixer -c 0 sset Speaker unmute
amixer "$@"
}
notify() {
#!/bin/sh
amixer_() {
# Workaround
amixer -c 0 sset Headphone unmute
amixer -c 0 sset Speaker unmute
amixer "$@"
}
notify() {
@pbrisbin
pbrisbin / example.md
Last active April 23, 2020 10:54 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@pbrisbin
pbrisbin / a-persistent.hs
Last active July 3, 2018 18:50
Persistent problems in LTS-11.15+
#!/usr/bin/env stack
-- stack script --resolver lts-10.8
-- vim: ft=haskell
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
@pbrisbin
pbrisbin / semver-pvp.md
Created February 16, 2018 00:31
Versioning Haskell: Semver <> PVP

I personally prefer [Semver][]. I think it's reasonable, simple, and makes sense. But as a good Haskell citizen, I'd like to be [PVP][]-compliant as well. Here is a bit of a graphic showing how the two systems are almost the same:

PVP:            A . B     . C     . ...
Semver:             Major . Minor . Patch
                    ^       ^       ^
                    |       |       |
                    |       |       ` increment for other changes
                    |       |
                    |       ` increment on non-breaking change