From c1af65afa0654c425846152192a742252ae36395 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 23 Feb 2020 00:06:39 -0300 Subject: /home/andreh/dev/libre/dotfiles/scripts/ad-hoc/pastebin.sh: Auto-add _pastebins/nix-string-padding.md --- _pastebins/nix-string-padding.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 _pastebins/nix-string-padding.md diff --git a/_pastebins/nix-string-padding.md b/_pastebins/nix-string-padding.md new file mode 100644 index 0000000..8de9048 --- /dev/null +++ b/_pastebins/nix-string-padding.md @@ -0,0 +1,10 @@ +--- +title: Nix string padding +date: 2018-07-13 +layout: pastebin +lang: en +--- + +```nix +padString = (n: if n < 10 then "0" + toString n else toString n) +``` -- cgit v1.2.3