Skip to content

Instantly share code, notes, and snippets.

View w0rp's full-sized avatar
💭
🍻 (I'm actually teetotal)

w0rp

💭
🍻 (I'm actually teetotal)
View GitHub Profile
@w0rp
w0rp / run-backup.sh
Created December 12, 2018 13:15
Backup YouTube channels
#!/bin/bash
# Change to the directory for this script.
cd "$(dirname "$(realpath "$0")")"
if ! [ -d ve ]; then
python3 -m venv ve
fi
ve/bin/pip install -q -U youtube-dl
@w0rp
w0rp / download-wow-addons.ps1
Last active November 4, 2018 17:41
A PowerShell script for downloading WoW addons easily
# This script downloads WoW addons to ~/Downloads in the new-addons directory,
# and replaces current versions of the addons with the updated addons.
# Makes Invoke-WebRequest not slow and useless.
$global:ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = "Stop"
cd ~/Downloads
$wowPath = "${env:ProgramFiles(x86)}\World of Warcraft\Interface\AddOns"
# Write (filename, url) here for the addons you want.
@w0rp
w0rp / create-callback-vader-test
Created August 2, 2017 20:28
Create Vader tests for ALE linters callbacks quickly
#!/bin/bash -eu
# A script for quickly creating Vader tests for ALE linter callbacks.
# Generate boilerplate for variables.
variables=()
while read -r; do
variables+=("ale_$REPLY")
done < <(grep 'ale#Set' "$1" | grep -o '[a-z]\+_[a-z_]\+')
" Use Tab and Shift+Tab for either completion or SnipMate.
function! SmartTab() abort
if pumvisible()
return "\<C-n>"
endif
return snipMate#TriggerSnippet()
endfunction
function! SmartShiftTab() abort