aboutsummaryrefslogtreecommitdiff
path: root/_pastebins
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-23 00:06:39 -0300
committerEuAndreh <eu@euandre.org>2020-02-23 00:06:39 -0300
commitc1af65afa0654c425846152192a742252ae36395 (patch)
tree5d6a19030af7d4b2275938e3ffdda002bcce92fc /_pastebins
parent/home/andreh/dev/libre/dotfiles/scripts/ad-hoc/pastebin.sh: Auto-add _pastebi... (diff)
downloadeuandre.org-c1af65afa0654c425846152192a742252ae36395.tar.gz
euandre.org-c1af65afa0654c425846152192a742252ae36395.tar.xz
/home/andreh/dev/libre/dotfiles/scripts/ad-hoc/pastebin.sh: Auto-add _pastebins/nix-string-padding.md
Diffstat (limited to '_pastebins')
-rw-r--r--_pastebins/nix-string-padding.md10
1 files changed, 10 insertions, 0 deletions
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)
+```