Skip to content

Instantly share code, notes, and snippets.

View kherge's full-sized avatar

Kevin Herrera kherge

View GitHub Profile
@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
@kherge
kherge / README.md
Created March 30, 2021 19:14
PowerToys Settings

PowerToys Settings

These files can be pulled from/saved to %USERPROFILE%\AppData\Local\Microsoft\PowerToys.

Gist Name FS Path
keyboard.json Keyboard Manager\default.json

Keyboard Manager

@kherge
kherge / Stylus.css
Last active May 17, 2023 18:11
Google Calendar Dark Mode
/* calendar.google.com */
:root {
--base-bg-color: #111111;
--base-fg-color: #eeeeee;
--border-color: #202020;
--button-hover-bg-color: #333333;
--button-hover-border-color: #404040;