Skip to content

Instantly share code, notes, and snippets.

@bitingsock
bitingsock / ytdl-preload.lua
Last active July 15, 2024 18:23
Precache the next entry in your playlist if it is a network source by downloading it to a temp file ahead of time. Change Line 20 to temp directory. It will delete the directory on exit.
----------------------
-- #example ytdl_preload.conf
-- # make sure lines do not have trailing whitespace
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider
-- #temp=R:\ytdltest
-- #ytdl_opt1=-r 50k
-- #ytdl_opt2=-N 5
-- #ytdl_opt#=etc
@anonymous1184
anonymous1184 / AppVol.ahk
Last active June 12, 2024 00:50
AppVol()
#Requires AutoHotkey v2.0
AppVol(Target := "A", Level := 0) {
if (Target ~= "^[-+]?\d+$") {
Level := Target
Target := "A"
} else if (SubStr(Target, -4) = ".exe") {
Target := "ahk_exe " Target
}
try {
@kepano
kepano / obsidian-web-clipper.js
Last active July 22, 2024 07:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active July 14, 2024 16:47
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
:root {
/* #7159de (similar to Obsidian purple) */
--block-ref-line-color: grey;
--block-ref-line-type: solid;
--block-ref-line-size: 2px;
/* Set to "inherit" for no bg color */
--block-ref-hover-bg-color: #d4d0d026;
}
/*
@potter0815
potter0815 / add-hypothesis-webclient-every-site.user.js
Last active March 20, 2024 09:37
Hypothes.is everywhere - Tampermonkey / greasemonkey script to enable Hypothes.is web client on all pages
// ==UserScript==
// @name Hypothes.is everywhere
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Enable Hypothesis scriptlet on all pages
// @author https://github.com/potter0815
// @match http://*/*
// @include http://*
// @include https://*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@charlie89
charlie89 / ahk_darkmode.ahk
Last active June 5, 2024 04:29
AutoHotkey v2 Dark Mode
#Requires AutoHotkey v2.0
; This script creates a dark mode for specific windows by inverting their colors.
; It uses the Windows Magnifier in the background for the color inverting, but it only inverts just the rectangle in place
; of the specific windows, NOT the whole screen like the Magnifier applicaion does. This is possible through DLL calls.
; Big thanks to the original source at https://www.autohotkey.com/boards/viewtopic.php?p=563023#p563023.
; Requirements:
; - AutoHotkey needs to be installed in C:\Program Files (or use the workaround from https://www.reddit.com/r/AutoHotkey/comments/16ux144/ui_access_without_reinstalling_in_program_files_v2/).
; - In the 'Launch Settings' of 'AutoHotkey Dash' you need to enable 'UI Access'.