Skip to content

Instantly share code, notes, and snippets.

Derek Mahar derekmahar

View GitHub Profile
@derekmahar
derekmahar / install_nix_in_an_lxd_container.md
Last active May 11, 2020
How to Install Nix in an LXD Container
View install_nix_in_an_lxd_container.md

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 Feb 26, 2018
Keybase Identify Proof
View keybase.md

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 Mar 6, 2014
Custom function definitions for Haskell AWK (Hawk). Store in .hawk/prelude.gs. See https://github.com/gelisam/hawk for details.
View prelude.hs
{- .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
Accented characters
View Accented characters
àÀ
âÂ
æÆ
çÇ
éÉ
èÈ
êÊ
ëË
îÎ
You can’t perform that action at this time.