h7x4
dcdf36f4dd
- Switch from `cabal2nix` and haskell overlay to `developPackage` - Restructure directories to have more descriptive names - Fix `nix run`
1.8 KiB
1.8 KiB
title | desc | keywords | updated |
---|---|---|---|
Debug page | Testing out some stuff | nix, nixos, linux | 2022-03-27 |
Logo links:
This is a logo link in the middle of a text: [nani|h7x4/dotfiles]. Isnt' it kinda cool?
[nxo|environment.etc] [nxp|niv] [nani|h7x4/dotfiles] [ga|gitea/tea] [gl|gitlab-org/gitlab] rd|Company-wide email + 30,000 employees + auto-responders = ... wiki|Computer Programming [hg|>>=] [hk|pcre-heavy] so|YouTube iframe embed - full screen [crt|clap] [npm|unofficial-jisho-api] [pub|unofficial_jisho_api] [yt|dQw4w9WgXcQ]
Here's some haskell code:
titleRoute :: Metadata -> Maybe Routes
titleRoute metadata = constRoute <$> fileNameFromTitle metadata
where
slug :: String -> String
slug = T.unpack . (`T.append` ".html") . Slugger.toSlug . T.pack
ignore :: Eq a => a -> a -> Maybe a
ignore shouldBeIgnored value
| shouldBeIgnored == value = Nothing
| otherwise = Just value
fileNameFromTitle :: Metadata -> Maybe FilePath
fileNameFromTitle metadata = slug <$> (ignore "" =<< lookupString "title" metadata)
Here's a graphviz graph
digraph G {
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}