Skip to content

Instantly share code, notes, and snippets.

@xRyul
xRyul / gist:c127482641144bb0263060cb729ca1be
Created February 22, 2024 21:30
Automated Mermaid Graph from Backlinks N levels deep - ObsidianMD
```dataviewjs
// If too many connections are found, mermaid wont render them.
// Thus, we have to limit either how deep we go via "var specifiedDepth = X;"
// Or, we can reduce amount of links shown "maxLinks = X"
var inlinks = [...new Set(dv.current().file.inlinks.map(link => link.path.split('/').pop().replace('.md', '')))];
var outlinks = [...new Set(dv.current().file.outlinks.map(link => link.path.split('/').pop().replace('.md', '')))];
var graph = [];
var classList = [];
var nodeNames = {};
@xRyul
xRyul / SaveTIFFwithJPEGCompression.jsx
Last active May 19, 2022 20:34
Save TIFF with JPEG Compression 10, ZIP
//It overwrites the same image in the current location. Thus run only on Smart Objects!!!!!
////////////////////////////////////////////////////////////////////////////////////////////
//Photoshop Script to save TIFF as JPEG Compression 10, ZIP.
////////////////////////////////////////////////////////////////////////////////////////////
//When run through the Droplet, user will not be prompted which Compression to use when saving transparency and/or together with Smart Objects.
//Another workaround was to use PSDs. Which also do not prompt thus allow for easy batching of images.
//But PSDs are 2x sometimes 3x bigger in size. Thus slow down the whole batching process. Not to mention those big files slow down, my already super slow machine.
//Using TIFF Jpegg 10, ZIP - saves space, runs faster, allows for batching.
// Start======================================================
@xRyul
xRyul / toast.ps1
Created April 19, 2022 05:52 — forked from dend/toast.ps1
Toast Notification in PowerShell
function Show-Notification {
[cmdletbinding()]
Param (
[string]
$ToastTitle,
[string]
[parameter(ValueFromPipeline)]
$ToastText
)
@xRyul
xRyul / gist:a31df629d07ca444a9a776a1d920d836
Created October 15, 2020 10:08
FIX Wacom Tablet on MacOS without restarting or unplugging the device
#v3
#Unload all Launch Agents
find /Library/LaunchAgents -iname '*wacom*.plist' -maxdepth 1 -exec launchctl unload {} \;
#Kill all Wacom Processes
kill $(ps aux | grep -v grep | grep -i wacom | awk '{print $2}' | grep -v 141)
sleep 2
#Relaunch all Wacom LaunchAgents