Skip to content

Instantly share code, notes, and snippets.

View kherge's full-sized avatar

Kevin Herrera kherge

View GitHub Profile
@kherge
kherge / README.md
Last active October 21, 2026 03:55
Obsidian Dashboard CSS

Obsidian Dashboard

The dashboard.css snippet defines a new callout that is designed to be used for organizing embedded Base views (i.e. ![[Example.base#My View]]) into rows and columns without using any plugins. The editing mode continues to look like normal callouts, but preview mode strips away much of the callout styling and applying the dashboard-like look and feel.

Example Dashboard Note

---
cssclasses:
 - dashboard
@kherge
kherge / utility.js
Last active June 8, 2026 18:12
A collection of utilities as a custom user script for the Templater plugin in Obsidian.
/**
* The base class for the find utility classes.
*
* When a tag is provided for inclusion or exclusion, the tag expression
* is converted into a regular expression. The tag expression supports the
* wildcard character `*`, which matches anything after the string. For
* example, the tag expression `project/*` would match any tag that starts
* with `#project/`, such as `#project/alpha` or `#project/beta`.
*/
class FindBase {
@kherge
kherge / Create Child.js
Created November 9, 2025 05:29
Obsidian: Create Child
const SETTING = {
ALIAS: "Use Alias",
PROMPT: "Prompt for Title",
PROPERTY: "Parent Property",
TEMPLATE: "Template",
TITLE: "Default Title",
};
const WAIT = 1000;
@kherge
kherge / Get Parent.js
Last active November 9, 2025 02:54
Obsidian: Get and Set Parent
const SETTING = {
ALIAS: "Use Alias",
};
const VARIABLE = "kherge:parent";
async function getParent({ app, variables }, settings) {
delete variables[VARIABLE];
const file = app.workspace.getActiveFile();
@kherge
kherge / .gitignore
Created May 20, 2025 22:23
Git allow instead of ignore
# Convert to allow list.
*
# Allow ignore lists.
!.gitignore
@kherge
kherge / README.md
Last active March 4, 2025 16:20
Bookmarket for Removing Hidden Reddit Posts

At least for me, Reddit has a problem actually hiding posts I have marked as hidden. With RES going away and Tamper Monkey being more difficult that this is worth, I created a simple bookmarklet to automatically remove hidden posts.

@kherge
kherge / README.md
Last active March 4, 2023 02:52
AWS CLI Extension

AWS CLI Extension

A simple POSIX compatible shell script to allow aws CLI commands and subcommands to be added or overwritten.

Usage

There are two naming conventions for your executables.

@kherge
kherge / bash.sh
Last active July 13, 2022 14:45
macOS Customizations
# Docker spacer icon.
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' \
&& killall Dock
# Faster dock hiding/showing.
defaults write com.apple.dock autohide-delay -float 0 \
&& defaults write com.apple.dock autohide-time-modifier -float 0.5 \
&& killall Dock
@kherge
kherge / poc.sh
Last active November 3, 2021 06:24
Using temporary pipes to run shell code from binary executables.
#!/bin/sh
###
# Uses the 3 pipe to run commands.
#
# In Rust: https://stackoverflow.com/a/54858159
##
inner()
{
echo 'echo "Hello, before!"' >&3
@kherge
kherge / README.md
Last active July 1, 2021 22:59
Containerized Development Environment Manager

Containerized Development Environment Manager

Uses Docker CLI to create a development environment as a container.

kherrera@machine Desktop % ./dev shell
[+] Building 1.5s (11/11) FINISHED                                                                                       
 => [internal] load build definition from Dockerfile                                                                0.0s
 => => transferring dockerfile: 882B                                                                                0.0s