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 | |
# 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 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 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 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 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 |