This file contains hidden or 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 | |
# | |
# Quick and dirty shell script to tag previously downloaded and untagged music from | |
# YT using the filename. Redownloading with --embed-metadata is a little...problematic | |
# with YT's latest efforts in trying to block downloaders, so this'll have to do. | |
# I'd go harder on splitting out the title/artist info but YT titles aren't the greatest. | |
# As a compromise, I record the original URLs as comments in each file. | |
# All of this just to show a now playing title from my silly private icecast server full | |
# of video game music. ¯\_(ツ)_/¯ |
This file contains hidden or 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 | |
# makes mocking alt caps text from stdin | |
upper=0 | |
while IFS= read -N 1 line; do | |
if [[ "$line" =~ [[:space::]] ]]; then | |
printf "%s" "$line" | |
elif (( upper == 0 )); then | |
printf "%s" "${line,}" | |
upper=1 |
This file contains hidden or 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 | |
# View droplr content from the terminal by extracting the content URL | |
# from the in-page JSON metadata | |
# | |
# Requires jq, feh and mpv | |
main() { | |
local url="$1" | |
local json_payload | |
local content_url |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Allows you to watch a twitch stream at the desired encoding rate | |
# using mpv + youtube-dl | |
twitch_name="$1" | |
if [[ -z "$twitch_name" ]]; then | |
printf "Error: twitch username required.\n" | |
exit 1 | |
fi |
This file contains hidden or 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
#!/usr/bin/bash | |
declare mins count colstart fmtmin fmtsec outp | |
mins="$1" | |
if [[ -z "$mins" ]]; then | |
printf 'Need a minute value.\n' | |
exit 1 | |
fi |
This file contains hidden or 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
" Vim indent file | |
" Language: CFScript | |
" Last Change: 2014 February 12 | |
" Version: 1.0 | |
" License: Same as Vim. | |
" Gutted version of the Java.vim file. Quick and dirty, but it works. | |
" Only load this indent file when no other was loaded. | |
if exists("b:did_indent") | |
finish |