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
@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 July 20, 2025 06:52
Bypass seccomp-bpf based memory-deny-write-execute with `READ_IMPLIES_EXEC`
/target
@sigzegv
sigzegv / init.lua
Last active November 27, 2025 00:33
vimrc for vim9+
--
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
@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
@girishji
girishji / vim9cmdline.md
Last active November 2, 2025 11:41
Vim Tip: Vim9script in Command Line

Note: This gist is now part of VimBits plugin.

As a Vim user, you might prefer the new vim9script over the legacy script, and wish to use it in the command line. While there's no direct option to switch the command line to parse vim9script, you can execute vim9script commands by simply prepending each command with vim9.

However, remember that execution occurs in the global context, not the script-local context. This means you need to declare variables with the g: prefix, like g:foo = 'bar'.

Common commands such as visual mode select ('<,'>), shell commands (!), substitution (s//), and global (g//) work as expected, even with vim9 prepended.

@ftk
ftk / Cargo.toml
Last active March 24, 2026 12:13
http mitm proxy. Simple http proxy to modify Range: http headers. Can be used to speed up youtube in mpv. This is no longer needed since mpv v0.42 (ffmpeg 8.1+).
# 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',
@Daan-Grashoff
Daan-Grashoff / README.md
Last active February 14, 2026 09:16
Bring back the google maps button when searching on google

Google Maps Button Restorer

This userscript brings back the Maps button in Google Search results, making it easy to search locations directly in Google Maps.

Features

  • Adds a Maps button next to the "All", "Images", "News" tabs in Google Search
  • Works across multiple Google domains (.com, .co.uk, .nl, .de, .fr)
  • Automatically updates when using Google's dynamic search
  • Maintains button presence during navigation
@digitalsignalperson
digitalsignalperson / bwrap-firefox.sh
Created January 25, 2024 03:16
Bubblewrapped firefox with a fifo on the host to open links inside the container
#!/bin/bash
URL_FIFO=$HOME/Downloads/ff_fifo
mkfifo "$URL_FIFO"
ffscript=$(mktemp)
cat > "$ffscript" << EOF
#!/bin/bash
echo "Creating profile"