Skip to content

Instantly share code, notes, and snippets.

@hyperfocus1337
hyperfocus1337 / frontmatter.js
Created October 26, 2024 10:36
Obsidian templater template that creates markdown front matter using the Denote file name convention
<%*
identifier = tp.date.now("YYYYMMDDTHHmmss"); // Generate unique identifier based on current timestamp
date = tp.date.now("YYYY-MM-DDTHH:mm:ssZ"); // ISO format date
title = await tp.system.prompt("Title"); // Prompt user for a title
tags = await tp.system.prompt("Tags"); // Prompt user for comma or space-separated tags
// Convert tags to an array by splitting on commas or spaces, remove extra spaces, and format them
tags_array = tags.split(/[,\s]+/).filter(tag => tag.trim()).map(tag => tag.toLowerCase().trim());
// Format the tags into a slug format for the filename
tags_slug = tags_array.join("_");
// Construct the file name (replace whitespaces in title with hyphens and append processed tags)
@hyperfocus1337
hyperfocus1337 / doom-emacs-init.el
Last active October 9, 2024 09:57
Doom Emacs init.el
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
@hyperfocus1337
hyperfocus1337 / doom-emacs-vspacecode.json
Last active October 4, 2024 15:01
Doom Emacs bindings for VSpaceCode
"vspacecode.bindings": [
{
"key": " ",
"name": "Open file from project",
"icon": "files",
"type": "command",
"command": "workbench.action.quickOpen"
},
{
"key": "*",
@hyperfocus1337
hyperfocus1337 / gist:0264b5ea2c32f31a1f42ddad5af5561d
Created July 26, 2020 14:28
Mac and terminal keyboard shortcuts and commands
Init
@hyperfocus1337
hyperfocus1337 / contenta-cms-errors.txt
Created April 26, 2019 10:42
Contenta CMS installation errors
This file has been truncated, but you can view the full file.
Error message
10Error messages
Notice: tempnam(): file created in the system's temporary directory in Drupal\Core\File\FileSystem->tempnam() (line 269 of core/lib/Drupal/Core/File/FileSystem.php).
Drupal\Core\File\FileSystem->tempnam('temporary://', 'file') (Line: 1224)
drupal_tempnam('temporary://', 'file') (Line: 984)
file_unmanaged_save_data('html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block;}audio,canvas,progress,video{display:inline-block;vertical-align:baseline;}audio:not([controls]){display:none;height:0;}[hidden],template{display:none;}a{background-color:transparent;}a:active,a:hover{outline:0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}h1{font-size:2em;margin:0.67em 0;}mark{background:#ff0;color:#000;}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{