Skip to content

Instantly share code, notes, and snippets.

@guidocella
guidocella / generate-edl.lua
Last active April 24, 2025 08:33
mpv script to bookmarks scenes in EDL playlists. Press Ctrl+e to mark the start of a scene, then press it a second time to mark the end and append the scene to bookmarks.edl.
local utils = require 'mp.utils'
local start
mp.add_key_binding('Ctrl+e', 'generate-edl', function ()
if start == nil then
start = mp.get_property_native('time-pos')
mp.osd_message('Saved start')
return
end
@agyild
agyild / FSR.glsl
Last active May 13, 2025 06:17
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@guidocella
guidocella / dump-cookies.sh
Last active February 2, 2025 22:28
Convert qutebrowser's cookies to Netscape format
#!/bin/sh
{
echo '# Netscape HTTP Cookie File' # needed by youtube-dl
# There is no attempt to url encode $1, but SQLite already handles
# characters like spaces, so only ? % and # should cause issues.
sqlite3 -separator ' ' "file:${1:-$HOME/.local/share/qutebrowser}/webengine/Cookies?nolock=1" "
SELECT
host_key,
# Name: softdenchi_remove.py
#
# Usage: Drag game.exe onto softdenchi_remove.py.
# This will make a new exe in the same location as game.exe.
#
# Process: SoftDenchi is a DRM that requires you to run its parent program in
# the background before it will run the protected binary. The parent
# service behaves eerily similar to malware in that it is constantly
# running in the background, even when you aren't using applications
# protected by it. The parent service UCManSvc is somewhat intricate
@sineemore
sineemore / st-proper-alpha-0.8.2.diff
Last active March 16, 2021 23:04
proper st alpha patch with premultiplied colors
diff --git a/config.def.h b/config.def.h
index 546edda..4f3e806 100644
--- a/config.def.h
+++ b/config.def.h
@@ -82,6 +82,9 @@ char *termname = "st-256color";
*/
unsigned int tabspaces = 8;
+/* bg opacity */
+float alpha = 0.8;
@miahmie
miahmie / Readme.md
Last active July 10, 2022 08:44
旧KAG3系の実装でもquakeが使いたい@吉里吉里Z

吉里吉里ZにはsetLayerPosが廃止されているので…

quakeタグが使えない,といっても割とどうとでもなります。 現に,

KAG3 for 吉里吉里Z や, 鱧入りKAG3 for 吉里吉里Z

では普通にquakeタグは使えるようになっています。(実際のところ揺らす先を変更しているだけ)

# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@fnky
fnky / ANSI.md
Last active May 21, 2025 18:57
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
<?php
/**
* Automatically alias Laravel Model's to their base classname.
* Ex: "App\Models\User" now can just be accessed by "User"
*/
if (! function_exists('aliasModels')) {
function aliasModels() {
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*.php')->in(base_path().'/app');
@philc
philc / gist:e849b48e6c5f32592d62
Created July 21, 2014 01:05
A script to copy Chrome's search engine settings into Vimium's settings format
#!/bin/sh
# This script lists user defined search engines in Chromium.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Chromium's 'Web Data' SQLite3 file
CHROMIUM_WEB_DATA="$HOME/.config/chromium/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while