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 node | |
// Usage: ./irc_to_markdown.js log.txt > log.md | |
// Still needs manuell edits afterwards. | |
require('fs').readFile(process.argv[2], (err, data) => { | |
if (err) return; | |
const content = data.toString().trim(); | |
const re = /^\[(.+?)\]\s+<(.+?)>\s(.*)$/gm; | |
const chat = []; | |
let current = {}; |
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
-- If the laptop is on battery, the VO set in the config will be choosen, | |
-- else the one defined with „hqvo“ is used. | |
local hqvo = "opengl-hq:gamma-auto" | |
local utils = require 'mp.utils' | |
if mp.get_property_bool("option-info/vo/set-from-commandline") == true then | |
return | |
end | |
t = {} | |
t.args = {"/usr/bin/pmset", "-g", "ac"} | |
res = utils.subprocess(t) |
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
local utils = require 'mp.utils' | |
local msg = require 'mp.msg' | |
local ls = { | |
path = "livestreamer", | |
} | |
mp.add_hook("on_load", 11, function() | |
if mp.get_property_bool("options/ytdl") then |
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() | |
subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path | |
mp.msg.info("Searching subtitle") | |
mp.osd_message("Searching subtitle") | |
t = {} |