Skip to content

Instantly share code, notes, and snippets.

View Hrxn's full-sized avatar
☯️
"He who knows, does not speak. He who speaks, does not know."

HRXN Hrxn

☯️
"He who knows, does not speak. He who speaks, does not know."
  • Germany
  • 15:57 (UTC +02:00)
View GitHub Profile
@ghedo
ghedo / 60fps.py
Last active November 15, 2021 19:31
VapourSynth script to convert videos to 60fps (with mpv)
# Usage: mpv --vf=vapoursynth=60fps.py --hwdec=no <file>
import vapoursynth as vs
core = vs.get_core()
src_fps = 24
dst_fps = 60
clip = core.std.AssumeFPS(video_in, fpsnum=src_fps)
super = core.mv.Super(clip, pel=2)
@phiresky
phiresky / motioninterpolation.vpy
Last active April 11, 2024 00:36
Realtime motion interpolating 60fps playback in mpv
# vim: set ft=python:
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth
core = vapoursynth.get_core()

Credit: Mark Kraus
Website: https://get-powershellblog.blogspot.com

Collection Type Guidence

When to use what

  • Use Arrays if you know the element types and have a fixed length and/or known-up-front collection size that will not change.
  • Use ArrayList if you have an unkown collection size with either unknown or mixed type elements.
  • Use a Generic List when know the type of the elements but not the size of the collection.
  • Use a HashTable if you are going to do key based lookups on a collection and don't know the object type of the elements.
  • Use a Dictionary<TKey, TValue> you are going to do key based lookups on a collection and you know the type of the elements.
  • Use a HashSet when you know the type of elements and just want unique values and quick lookups and assignmnets.
@fnky
fnky / ANSI.md
Last active May 7, 2024 09:24
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@TheAMM
TheAMM / mpv_geometry_freezer.lua
Created November 13, 2018 23:33
mpv_geometry_freezer.lua keeps your mpv window size unchanging
--[[
mpv_geometry_freezer.lua
Sets the geometry property when window size changes,
avoiding Windows' maximized windows detaching.
- AMM
]]--
local msg = require 'mp.msg'
local UPDATE_INTERVAL = 0.5
local screen_w, screen_h = mp.get_osd_size()
@bjin
bjin / acme-0.5x.hook
Last active April 21, 2024 01:55
simple 0.5x prescaler for mpv, best combined with "--cscale=bilinear --scaler-resizes-only --window-scale=0.5"
//!DESC acme-0.5x
//!HOOK LUMA
//!BIND HOOKED
//!WIDTH HOOKED.w 2 /
//!HEIGHT HOOKED.h 2 /
//!WHEN HOOKED.w 2 % ! HOOKED.h 2 % ! *
//!OFFSET 0.25 0.25
vec4 hook() {
return HOOKED_texOff(vec2(-0.25,-0.25));
}
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 6, 2024 10:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@apankrat
apankrat / readme.txt
Last active August 30, 2021 02:45
μGiffer 0.9.10 (preview)
-- μGiffer / preview release --
https://iobureau.com/files/uGiffer-0.9.12.zip (213576 bytes)
------------------------> 32-bit/uGiffer.exe (111488 bytes)
------------------------> 64-bit/uGiffer.exe (123264 bytes)
Both exe files carry an EV signature of IO Bureau SA.
For details see here -> https://iobureau.com/ugiffer
@v-fox
v-fox / motioninterpolation.vpy
Last active September 19, 2023 00:48 — forked from phiresky/motioninterpolation.vpy
On-CPU motion interpolation for ≤480@144, ~720@120, ≥1080p@60 playback in mpv
#!/usr/bin/python
# vim: set ft=python:
# see the README at https://gist.github.com/v-fox/43c287426c366679afc4c65eece60cbc
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth as vs
import functools
--[[
See script details on https://github.com/kevinlekiller/mpv_scripts
Valid --script-opts are (they are all optional):
autospeed-nircmd=false true/false - Use nircmd to change the refresh rate of your monitor.
autospeed-speed=false true/false - Adjust speed of the video?.
autospeed-nircmdc="nircmdc" String - Path to nircmdc executable file. If not set, nircmdc will be searched in Windows PATH variable.
autospeed-monitor=0 Number - Which monitor (display) to set the refresh rate on.
autospeed-dwidth=1920 Number - Display width.
autospeed-dheight=1080 Number - Display height.