Skip to content

Instantly share code, notes, and snippets.

@bugdone
bugdone / dualsubs.lua
Last active February 20, 2023 06:07
Display ko and en subtitles simultaneously in mpv
function dualsubs()
local i = 0
local tracks_count = mp.get_property_number("track-list/count")
while i < tracks_count do
local track_type = mp.get_property(string.format("track-list/%d/type", i))
local track_lang = mp.get_property(string.format("track-list/%d/lang", i))
local track_id = mp.get_property(string.format("track-list/%d/id", i))
if track_type == "sub" then
if string.match(track_lang, "en") then
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active June 19, 2024 00:04
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@knadh
knadh / zsh-elapsed-time.md
Last active May 30, 2024 12:32
Elapsed and execution time for commands in ZSH

Elapsed and execution time display for commands in ZSH

Append this to your ~/.zshrc file.

function preexec() {
 timer=$(($(date +%s%0N)/1000000))
@jeetsukumaran
jeetsukumaran / DisableNonCountedBasicMotions.vim
Last active January 25, 2019 12:06
Disable Basic Motions if not Preceded By a Count
" Notes:
" (1) To enhance the ergonomics of this sufficiently to make it practical, at
" least, until your brain grows a new lobe dedicated to counting line offsets
" in the background while you work, you should either make sure you have
" something like the following in your `~/.vimrc`:
"
" set number
" if has('autocmd')
" augroup vimrc_linenumbering
" autocmd!
@jbernhard
jbernhard / 30-scale-font.conf
Created September 3, 2014 15:02
Scale font size, useful for hidpi.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test name="family">
<string>Inconsolatazi4</string>
</test>
<edit name="pixelsize" mode="assign">
@bancek
bancek / cue_to_mp3.py
Last active May 22, 2024 11:11
CUE splitter using ffmpeg (to mp3)
cue_file = 'file.cue'
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶