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 YouTube Unpause | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Disable the programmatic pausing of YouTube videos in response to detecting adblock | |
// @author Michael | |
// @match https://www.youtube.com/watch?v=* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== |
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
import sys | |
# https://classroom.google.com/c/NTU0OTE4MjA4NzMw/p/NTU1MjExNjY2MTI0/details | |
# CLI usage: python rings.py input.txt | |
routes = [] | |
with open(sys.argv[1]) as file: | |
routes = file.readlines() | |
for i, route in enumerate(routes): | |
routes[i] = route.rstrip() |
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
// https://classroom.google.com/c/NTU0OTE4MjA4NzMw/p/NTAyNDg0NzYyNjQ2/details | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" |
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/sh | |
# Edit this if you're not using TSV | |
DELIM=" " | |
doc=' | |
descript: convert scripture decks to tunnel decks | |
usage: descript <deck file> | |
This prints to stdout so you can do something like |
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/sh | |
doc=' | |
msk_display: display a short text in an image using imagemagick | |
useful for e.g. showing Japanese characters in a proper font | |
usage: msk_display "<text>" | |
sxiv is not called with &, so you might want to run msk_display ... & | |
' |
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/sh | |
# msk_pass: uses bpass in dmenu | |
# use in sxhkd | |
picked=$(ls $BP_HOME | dmenu) | |
[ $picked ] && exit | |
master=$(:| dmenu) | |
[ $master ] && exit |
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
--- old | |
+++ new | |
@@ -35,7 +35,7 @@ | |
0) echo 'No more tracks in queue. Please refresh the database, or set $MSK_MUSIC_REFRESH.' && exit 1 ;; | |
# No tracks, but user wants automatic refreshing | |
- 1) find "$MUSIC_DIR" -type f | shuf > "$XDG_DATA_HOME/msk_music/tracks" ;; | |
+ 1) find "$MUSIC_DIR" -type f -name "*.mp4" | shuf > "$XDG_DATA_HOME/msk_music/tracks" ;; | |
esac | |
fi |
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/sh | |
[ -z "$1" -o -z "$2" ] && . err | |
music_dir=$1 | |
tracks=$2 | |
# Otherwise wc could error on a non-existent | |
[ -f "$tracks" ] || touch "$tracks" |
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/sh | |
unread=$XDG_CONFIG_HOME/msk/rss/rss_unread | |
marked=$XDG_CONFIG_HOME/msk/rss/rss_marked | |
touch "$marked" | |
case "$1" in | |
get|mark|mark_get) [ "$2" ] || . err ;; | |
esac | |
missed() { |
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/sh | |
# a case statement works way better than the terrible xdg-open | |
# usage: msk_open <file> | |
# Get the raw filetype | |
type=$(file -i "$1") | |
# Parse file -i | |
type=${type#*: } |
NewerOlder