Skip to content

Instantly share code, notes, and snippets.

-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60
@facelessuser
facelessuser / json_strip.py
Last active April 1, 2019 17:28
json_strip
"""
File Strip.
Licensed under MIT
Copyright (c) 2012 - 2019 Isaac Muse <isaacmuse@gmail.com>
"""
import re
LINE_PRESERVE = re.compile(r"\r?\n", re.MULTILINE)
JSON_COMMENTS_PATTERN = re.compile(
@z411
z411 / trackma_export.py
Last active June 5, 2018 10:02
Trackma MAL XML exporter
#!/usr/bin/env python3
# Short script that loads a Trackma anime list and converts it
# to a MyAnimeList XML file. This way you can import your list
# in sites that support this format.
#
# Usage:
# ./trackma_export.py ~/.trackma/<user>.mal/anime.list
#
# It saves it as mal.xml in the working directory.
sampler s0 : register(s0);
#define const_1 ( 16.0 / 235.0)
#define const_2 (235.0 / 219.0)
float4 main(float2 tex : TEXCOORD0) : COLOR
{
// original pixel
float4 c0 = tex2D(s0, tex);
@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active June 11, 2024 06:48
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@carstene1ns
carstene1ns / discord-bot-bridge.pl
Last active August 18, 2017 18:05
HexChat plugin to map bot messages in `<nick> message` format to messages coming from nick directly instead
# Name: discord-bot-bridge.pl
# Author: carstene1ns < dev f4ke de >
# Date: 2017-08-04
# License: This code is put in the public domain.
use strict;
use warnings;
use utf8;
use v5.26.0;
use HexChat;
export script_name = "Count Layout Lines"
export script_description = "Counts the number of layout lines produced on the canvas per subtitle line."
export script_version = "0.1.0"
export script_author = "line0"
export script_namespace = "l0.CountLayoutLines"
DependencyControl = require "l0.DependencyControl"
depRec = DependencyControl {
feed: "https://raw.githubusercontent.com/TypesettingTools/line0-Aegisub-Scripts/master/DependencyControl.json",
@kageru
kageru / README.md
Last active March 31, 2022 12:03
Standalone script using Vapoursynth to determine the original resolution of scaled images or videos.

This version is deprecated

I’ve stopped updating this a while ago because some people made a proper respository with a few necessary fixes and changes. Just get this version from now on: https://github.com/Infiziert90/getnative

@StepS-
StepS- / twitch.py
Last active October 14, 2019 14:04
import hexchat
__module_name__ = 'Twitch'
__module_author__ = 'TingPing, frumpy4, StepS'
__module_version__ = '6.8'
__module_description__ = 'Better integration with Twitch.tv'
# Commands from http://help.twitch.tv/customer/portal/articles/659095-chat-moderation-commands
# Enable the "commands" and "membership" caps for the best effect
# See https://github.com/justintv/Twitch-API/blob/master/chat/capabilities.md for an up-to-date list.
@mathiasbynens
mathiasbynens / README.md
Last active August 5, 2023 03:20
Superfish certificate