Skip to content

Instantly share code, notes, and snippets.

View derekmahar's full-sized avatar

Derek Mahar derekmahar

  • Montreal, Quebec, Canada
  • 04:04 (UTC -04:00)
View GitHub Profile
@derekmahar
derekmahar / install_nix_in_an_incus_container.md
Last active September 17, 2025 19:02
How to Install Nix in an LXD Container

How to Install Nix in an LXD Container

Steps to install the Nix package manager inside an Ubuntu 24.04 Incus container using the images:ubuntu/noble image:

  1. On the Incus host, create an Ubuntu 24.04 container:
    lxc init images:ubuntu/noble container1
    
  2. On the Incus host, enable nested security on the container:
@derekmahar
derekmahar / keybase.md
Created February 26, 2018 15:51
Keybase Identify Proof

Keybase proof

I hereby claim:

  • I am derekmahar on github.
  • I am derekmahar (https://keybase.io/derekmahar) on keybase.
  • I have a public key whose fingerprint is 635F A678 8114 0312 0ED2 5400 D717 DA46 33E5 D1BE

To claim this, I am signing this object:

@derekmahar
derekmahar / prelude.hs
Created March 6, 2014 14:45
Custom function definitions for Haskell AWK (Hawk). Store in .hawk/prelude.gs. See https://github.com/gelisam/hawk for details.
{- .hawk/prelude.hs -}
{-# LANGUAGE ExtendedDefaultRules, OverloadedStrings #-}
import Prelude
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Search as S
import qualified Data.List as L
replace :: String -> String -> BL.ByteString -> BL.ByteString
replace search replacement input = S.replace (B.pack search) (B.pack replacement) input
@derekmahar
derekmahar / Accented characters
Last active May 11, 2020 02:06
Accented characters
àÀ
âÂ
æÆ
çÇ
éÉ
èÈ
êÊ
ëË
îÎ