Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@jasondavis
jasondavis / Index.html
Last active March 30, 2025 21:40
Printable link directory for an HTML page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Printable link directory for an HTML page · tollwerk</title>
<style>
pre {
padding: 1em;
background-color: #eee;
border: 1px solid #000;
@jasondavis
jasondavis / obsidian.templater.pane.send-to-next.js
Created December 20, 2024 22:59 — forked from GitMurf/obsidian.templater.pane.send-to-next.js
Send the current active line of text or if text is selected, send the selection... to the pane next to the active one
<%*
//OPTIONS: TOP / BOTTOM
const whereToWrite = "TOP";
//OPTIONS: COPY / MOVE
const copyOrMove = "COPY";
//Find leaf next door
const thisLeaf = app.workspace.activeLeaf;
const thisFile = thisLeaf.view.file;
let leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right");
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");}
javascript: (function() {
var scripts = document.getElementsByTagName("script"),
regex = /(?<=(\"|\%27|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\%60))/g;
const results = new Set;
for (var i = 0; i < scripts.length; i++) {
var t = scripts[i].src;
"" != t && fetch(t).then(function(t) {
return t.text()
}).then(function(t) {
var e = t.matchAll(regex);
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@jasondavis
jasondavis / git lol.md
Created May 29, 2023 02:43 — forked from Omerr/git lol.md
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

@jasondavis
jasondavis / obsidian-daily-note-template.txt
Created April 25, 2023 18:32 — forked from dannberg/obsidian-daily-note-template.txt
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[<% fileDate = moment(tp.file.title, 'YYYY-MM-DD-dddd').subtract(1, 'd').format('YYYY-MM-DD-dddd') %>|Yesterday]] | [[<% fileDate = moment(tp.file.title, 'YYYY-MM-DD-dddd').add(1, 'd').format('YYYY-MM-DD-dddd') %>|Tomorrow]] >>
---
@jasondavis
jasondavis / Copy direct link to Gmail email.md
Created April 25, 2023 15:10 — forked from alangrainger/Copy direct link to Gmail email.md
Copy a direct link to a Gmail email to your clipboard
@jasondavis
jasondavis / tiktok-download.ahk
Created April 20, 2023 17:51 — forked from antiops/tiktok-download.ahk
AutoHotKey script to automatically download TikTok videos that are copied to your clipboard
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
; Requires yt-dlp
; You might need to change the '$HOME' and '$USERNAME' if they dont work
; $HOME = 'C:\Users\YourUsername'; $USERNAME is your windows username
ClipChanged(Type) {
If InStr(Clipboard, "https://www.tiktok.com/@")
Or InStr(Clipboard, "https://tiktok.com/@") {
@jasondavis
jasondavis / EasyStreamDeck.ahk
Created April 16, 2023 01:47 — forked from G33kDude/EasyStreamDeck.ahk
Launch AutoHotkey code from a StreamDeck efficiently using GET requests
#NoEnv
#Persistent
SetBatchLines, -1
#Include <Socket>
/*
Launch AutoHotkey code from a StreamDeck efficiently using GET requests