Skip to content

Instantly share code, notes, and snippets.

View bjin's full-sized avatar

bjin

  • Naples, Italy
View GitHub Profile
@bjin
bjin / hyperview.hook
Last active December 14, 2023 23:04
dynamic stretching filter for mpv, aiming to bring effects similar to GoPro SuperView. use along with '--no-keepaspect'
//!DESC hyperview
//!HOOK MAIN
//!WHEN OUTPUT.width OUTPUT.height / MAIN.width MAIN.height / / 0.667 >
//!WIDTH OUTPUT.width
//!BIND HOOKED
vec4 hook() {
float r = (target_size.x / target_size.y) / (HOOKED_size.x / HOOKED_size.y);
// y = (r - 1) * x^3 + x
@bjin
bjin / .gitignore
Last active May 24, 2020 08:44
mpv user shader to fix radial distortion commonly found in wide angle action cameras
*.mp4
*.mov
*.png
*.txt
@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));
}
@bjin
bjin / .gitignore
Last active March 24, 2020 19:00
ravu-hlsl
*.spv
@bjin
bjin / template.cpp
Created June 23, 2017 08:16
moj templates
// {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
@bjin
bjin / Dockerfile
Last active March 29, 2023 12:49
stack-docker
FROM alpine:3.12
ENV GHC_VERSION=9.4.4
RUN apk add --update --no-cache shadow ca-certificates curl tar libc-dev libffi-dev zlib-dev zlib-static linux-headers git openssh xz perl bash alpine-sdk gmp-dev binutils-gold && \
update-ca-certificates
RUN (curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack')
RUN (curl -L https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-x86_64-alpine3_12-linux-static-int_native.tar.xz | tar xJ -C /tmp) && \
@bjin
bjin / extension_0_8_0.crx
Last active July 2, 2023 18:39
shortcut manager export
@bjin
bjin / .gitignore
Last active August 29, 2015 14:14
raidz-calc
*.hi
*.o
/calc
<!--
Lookup musicbrainz and freedb by EAC log.
Copyright 2010, kolen
Released under the MIT License
-->
<html>
<head>
<title>Look up musicbrainz disc id and freedb id from EAC/XLD log</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
@bjin
bjin / .gitignore
Last active December 13, 2023 16:20 — forked from quark-zju/ipv4_inv.cc
/ipv4_inv