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 -xe | |
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice" | |
[Slice] | |
AllowedCPUs=0-4 | |
MemoryHigh=6G | |
EOF | |
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop" |
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
--[[ | |
mpv dynaudnorm filter with visual feedback. | |
Copyright 2016 Avi Halachmi ( https://github.com/avih ) | |
Copyright 2020 Paul B Mahol | |
License: public domain | |
Needs mpv with very recent FFmpeg build. | |
Default config: |
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
Convert PCF and BDF files to bitmap only OpenType (.otb) using fontforge | |
If you have a new enough fontforge, the python version of this script can | |
optionally read filenames from standard input, generating multiple .otb | |
font files as it finds new families. It also handles gzipped PCF and BDF | |
files. |
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
cmCenter = 1 | |
local defCenter = 1 | |
cmFront = 0.707 | |
local defFront = 0.707 | |
cmSide = 0.707 | |
local defSide = 0.707 | |
cmBack = 0.707 | |
local defBack = 0.707 | |
cmLFE = 0 | |
local defLFE = 0 |
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
// Code mostly extracted from https://www.libsdl.org/projects/ixalance/ but fixed a bunch of 64-bit issues with the code | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define INDEX_BIT_COUNT 10 // This is a total window of 4Kb | |
#define LENGTH_BIT_COUNT 4 | |
#define WINDOW_SIZE ( 1 << INDEX_BIT_COUNT ) |
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
local utils = require 'mp.utils' | |
local ytdlPath = mp.find_config_file("youtube-dl.exe") | |
local fileDuration = 0 | |
local function check_position() | |
if fileDuration==0 then | |
mp.unobserve_property(check_position) | |
return | |
end | |
local demuxEndPosition = mp.get_property("demuxer-cache-time") | |
if demuxEndPosition and |
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
-- Not my code: originally from https://redd.it/3t6s7k (author deleted; failed to ask for permission). | |
-- Only tested on Windows. Date is set to dd/mmm/yy and time to machine-wide format. | |
-- Save as "mpvhistory.lua" in your mpv scripts dir. Log will be saved to mpv default config directory. | |
-- Make sure to leave a comment if you make any improvements/changes to the script! | |
local HISTFILE = (os.getenv('APPDATA') or os.getenv('HOME')..'/.config')..'/mpv/mpvhistory.log'; | |
mp.register_event('file-loaded', function() | |
local title, logfile; |
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
-- settings | |
-- key_binding: press the key specified below | |
-- to cycle between denoise filters below, | |
-- set it to nil to disable the binding | |
local key_binding = "n" | |
-- key_binding_reverse cycle between denoise filters below | |
-- in reverse order, set it to nil to disable the binding, | |
-- set it to a single-char string to enable | |
local key_binding_reverse = nil |
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
-- betterchapters.lua | |
-- seeks forward until a black screen appears. | |
-- default keybinding: b | |
-- Keybind names: skip_scene | |
script_name = mp.get_script_name() | |
detect_label = string.format("%s-detect", script_name) | |
detecting = false | |
threshold = 0.9 | |
detection_span = 0.05 | |
negation = false |
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 | |
echo -en "¯\\_(\xe3\x83\x84)_/¯" | xsel | |
xdotool key Shift+Insert |
NewerOlder