Skip to main content

Move across a few more snippets

ID
50eac99
date
2024-04-09 09:50:48+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
240b2a4
message
Move across a few more snippets
changed files
1 file, 18 additions

Changed files

create_snippets.py (2090) → create_snippets.py (2538)

diff --git a/create_snippets.py b/create_snippets.py
index 925e536..3ee659f 100755
--- a/create_snippets.py
+++ b/create_snippets.py
@@ -12,6 +12,19 @@ import zipfile
 # fmt: off
 SNIPPETS = {
     # =========================
+    # Get the current date/time
+    # =========================
+
+    # pretty, e.g. 9 April 2024
+    ";dp": "{isodate:d MMMM yyyy}",
+
+    # short, e.g. 2024-04-09
+    ";ds": "{isodate:yyyy-MM-dd}",
+
+    # e.g. 2024-04-09 10:49:12 +0100
+    ";dd": "{isodate:yyyy-MM-dd HH:mm:ss Z}",
+
+    # =========================
     # English words and phrases
     # =========================
     "ina11e": "inaccessible",
@@ -32,6 +45,11 @@ SNIPPETS = {
     "!py": "#!/usr/bin/env python3\n\n",
     "!rb": "#!/usr/bin/env ruby\n",
     "!swift": "#!/usr/bin/env swift\n",
+
+    # ============================
+    # Programming: Python snippets
+    # ============================
+    "!j": "import json\n",
 }
 # fmt: on