Skip to content

Instantly share code, notes, and snippets.

View Matt-Deacalion's full-sized avatar
🏹
Ready, Fire, Aim!

Matt Matt-Deacalion

🏹
Ready, Fire, Aim!
  • Budapest, Hungary
View GitHub Profile
@karolba
karolba / .vimrc
Last active January 15, 2025 13:07
my new vimrc in Vim9 script
vim9script
# vim: sts=4 sw=4 sts=4 et
&compatible = false # It's not 1980 anymore, don't care about vi-compatibility
syntax on # This should be set by default, but just in case
filetype plugin indent on # This should be set by default, but just in case
&autowrite = true # Write the contents of the file automatically before many actions
&autoread = true # Detect when other programs modify a file we're editing
&backspace = 'indent,eol,start' # Allow backspacing over everything in insert mode.
&backup = true # Enable backups
@s3rgeym
s3rgeym / README.md
Last active March 5, 2025 17:11
Превращаем Vim в VS Code

image

@o770
o770 / mpvf.md
Last active January 8, 2025 06:40
Run MPV with optional MPV profiles on a set of files found with GNU Find.

MPVF is a Bash script that runs MPV with optional MPV profiles on a set of files found with GNU Find by including and excluding shell patterns and setting the depth levels in the directory tree. Search patterns and directories are entered on the command line or in the script. File names can also be matched against an optional list of file extensions. With no options entered, the script's defaults are used.

Usage
mpvf {[<mpv profile,...>] [-a <pattern>] [-e <pattern>] [-i <pattern>] [-n <levels>] [-x <levels>] [directory...] | --help | --version}

Options
<mpv profile,...>
Name of the MPV profile to use.

-a, --alt \

@copyleftdev
copyleftdev / cheat-sheet.md
Created August 24, 2024 06:44
Ultimate Linux Terminal Tricks Cheatsheet

🚀 Ultimate Linux Terminal Tricks Cheatsheet

🧭 Navigation Ninja

Command Description
cd - 🔙 Teleport to previous directory
pushd <dir> 📚 Change directory, save current to stack
popd 📚 Return to most recently pushed directory
cd ~ 🏠 Go to home directory
@rusty-snake
rusty-snake / .gitignore
Last active October 20, 2024 13:36
Bypass seccomp-bpf based memory-deny-write-execute with `READ_IMPLIES_EXEC`
/target
@sigzegv
sigzegv / vimrc
Last active March 2, 2025 18:45
vimrc for vim9+
vim9script
# https://vimhelp.org/vim9.txt.html
set nocompatible
if has("mac")
set clipboard=unnamed
else
set clipboard=unnamedplus # requires vim-gui-common
endif
@wolandark
wolandark / dict.vim
Created June 20, 2024 23:33
dict wrapper in vim9script. Gets word_under_cursor definition from wordnet and displays it in a split buffer
vim9script
def GetWord()
var word_under_cursor = expand('<cword>')
var result = system('dict -d wn ' .. word_under_cursor)
execute 'vnew'
setlocal buftype=nofile
setlocal bufhidden=hide
@ftk
ftk / notification-watch.sh
Last active October 10, 2024 13:27
check for one-time codes coming as notifications via KDE connect and copy them to clipboard
#!/usr/bin/env bash
# check for one-time codes coming as notifications via KDE connect and copy them to clipboard
# requirements: qdbus(qt-tools), dbus-monitor, kde-connect, klipper
# the script must be run in user session
set -euo pipefail
shopt -s lastpipe
if [[ $# -eq 0 ]]
then
@ftk
ftk / Cargo.toml
Last active May 4, 2025 18:42
http mitm proxy. Simple http proxy to modify Range: http headers. Can be used to speed up youtube in mpv
# To generate mitm cert and key:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com"
# see: https://github.com/campbellC/third-wheel
[package]
name = "http-ytproxy"
version = "0.1.0"
edition = "2021"
@foriequal0
foriequal0 / github-spa-on-navigate.js
Created April 30, 2024 04:58
GitHub SPA listen navigation event
function onNavigate(listener) {
// GitHub uses Turbo for tab navigations.
// You can listen initial page load event, or subsequent tab navigations with this.
// https://turbo.hotwired.dev/reference/events#turbo%3Aload
window.addEventListener("turbo:load", listener);
// For the file/dir navigation, it emits following events to the document.
/*
export const SOFT_NAV_STATE = Object.freeze({
INITIAL: 'soft-nav:initial',