Skip to content

Instantly share code, notes, and snippets.

View derekmahar's full-sized avatar

Derek Mahar derekmahar

  • Montreal, Quebec, Canada
View GitHub Profile
@derekmahar
derekmahar / install_nix_in_an_lxd_container.md
Last active February 22, 2024 12:38
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 20.04 LXD container using the images:ubuntu/focal image:

  1. On the LXD host, create an Ubuntu 20.04 container:
    lxc init images:ubuntu/focal container1
    
  2. On the LXD 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
àÀ
âÂ
æÆ
çÇ
éÉ
èÈ
êÊ
ëË
îÎ