This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Normalize YouTube Title Text | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Normalizes the annoying fancy text that some video titles use. | |
// @author You | |
// @match https://www.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @run-at document-idle | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you've ever encountered this warning in neovim, uninstall the `global` package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! ```cargo | |
//! [dependencies] | |
//! unicode-segmentation = "1.10.1" | |
//! unicode-width = "0.1.11" | |
//! | |
//! [dev-dependencies] | |
//! criterion = "0.5" | |
//! | |
//! [[bench]] | |
//! name = "truncate_str_bench" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! ```cargo | |
//! [dependencies] | |
//! unicode-segmentation = "1.10.1" | |
//! unicode-width = "0.1.11" | |
//! | |
//! [dev-dependencies] | |
//! criterion = "0.5" | |
//! | |
//! [[bench]] | |
//! name = "truncate_str_bench" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import subprocess | |
import sys | |
nicknames = dict(tuple(n.split("=")) for n in sys.argv[1:]) | |
call = subprocess.run(["solaar", "show"], stdout=subprocess.PIPE) | |
out = call.stdout | |
devices = [o for o in out.split(b"\n\n")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import subprocess | |
import sys | |
nicknames = dict(tuple(n.split("=")) for n in sys.argv[1:]) | |
call = subprocess.run(["upower", "-d"], stdout=subprocess.PIPE) | |
out = call.stdout | |
devices = [o for o in out.split(b"\n\n")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import requests | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
import urllib.parse | |
import sys | |
def download(url): | |
stripped_url = str.strip(url).removeprefix('"').removesuffix('",') | |
file_name = urllib.parse.unquote_plus(stripped_url.split("/")[-1].split("?")[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let parent_node = document.getElementById('primary-inner'); | |
const CONFIG = { attributes: true, childList: true, subtree: true }; | |
const OBSERVER = new MutationObserver(() => { | |
let target_node = document.getElementById('comments'); | |
if (target_node != null) { | |
target_node.hidden = true; | |
// console.log("Hiding comments..."); | |
OBSERVER.disconnect(); | |
// console.log("Disconnected. Job done."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name "*.tex" | while read file_name; do pandoc "${file_name}" -f latex+lhs -o "${file_name%.*}.md"; done |