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
-- requires subliminal, version 1.0 or newer | |
-- default keybinding: b | |
-- add the following to your input.conf to change the default keybinding: | |
-- keyname script_binding auto_load_subs | |
local utils = require 'mp.utils' | |
function load_sub_fn() | |
lang_ids = {"en", "es"} | |
subl = "/usr/bin/subliminal" | |
--local path = mp.get_property("working-directory").."/"..mp.get_property("path") | |
local pathfile = mp.get_property("path") |
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
This other day, I wanted to add a geotag to my git commits - like a character in Stephenson's Cryptonomicon has for email. Here's how I did it: | |
Requirements: | |
- jq | |
- nmcli | |
- perl | |
First, create a directory for git templates (eg. ~/.git). Then point git to globally use that directory: `git config --global init.templatedir ~/.git` | |
Then create a prepare-commit-msg hook: | |
~/.git/hooks/prepare-commit-msg: | |
echo "Made at meatspace coordinates " >> "$1" |