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
@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"
@lifepillar
lifepillar / reactive-framework.vim
Created December 29, 2023 17:33
Building a Reactive Library from Scratch in Vim 9 Script
vim9script
# Translation into Vim 9 script of the tutorial at:
# https://dev.to/ryansolid/building-a-reactive-library-from-scratch-1i0p
# Helper functions and classes {{{
def IndexOf(items: list<any>, item: any): number
return indexof(items, (_, e) => e is item)
enddef
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <[email protected]>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@tombowditch
tombowditch / tunneling.md
Last active September 3, 2024 06:32 — forked from itslukej/tunneling.md
Tunneling a whole process through wireguard

Tunneling a whole process through wireguard

Certain company blocking a certain hosting provider? No problem, just tunnel the process through a small VPS with wireguard.

Consider server A your blocked server and server B your VPS.

Step 1: Generate a keypair on server A and server B

Server A:

@skrymets
skrymets / Cornell's Notes Template.md
Last active February 23, 2025 13:03
Cornell Note Template for Obsidian
cssclass
cornell-note
Cues

Notes

The Cornell Note-taking System is a popular and effective method for organizing and summarizing information during lectures, readings, or any other form of learning.

@romainl
romainl / vanilla-surround.md
Last active March 16, 2025 10:41
Poor man's Surround

Poor man's Surround

The following shows how to replicate some of Surround's features if you don't happen to have it installed.

NOTE: We only dealt with the simplest cases, here, and the convoluted nature of some of these commands shows how well designed and useful that plugin is. And let's not talk about all the corner cases it handles.

Install it, it's worth it.

The list

@kevinlekiller
kevinlekiller / sofalizer.lua
Last active February 13, 2025 18:19
Lua script for mpv to enable sofalizer, with sofa file inside of mpv's ~~/
--[[
Copyright (C) 2023 kevincs
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@dustinknopoff
dustinknopoff / migrateToTaxonomies.ts
Last active October 12, 2024 10:05
This is written expecting to be in the top level directory of a Zola project and can be run `deno run --allow-read=. --allow-write=. migrateToTaxonomies.ts`
import {
extract,
test as containsFrontmatter,
} from "https://deno.land/[email protected]/encoding/front_matter/any.ts";
import { walk } from "https://deno.land/[email protected]/fs/mod.ts";
import { stringify } from "npm:[email protected]"
async function writeFile(path: string, attrs: { [key: string]: any }, body: string) {
await Deno.writeTextFile(path, `---\n${stringify(attrs)}\n---\n\n${body}`)
}
@tjdevries
tjdevries / cfilter.lua
Created September 29, 2022 03:12
cfilter.vim -> cfilter.lua
-- vim9script
-- # cfilter.vim: Plugin to filter entries from a quickfix/location list
-- # Last Change: Jun 30, 2022
-- # Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
-- # Version: 2.0
-- #
-- # Commands to filter the quickfix list:
-- # :Cfilter[!] /{pat}/
-- # Create a new quickfix list from entries matching {pat} in the current
-- # quickfix list. Both the file name and the text of the entries are
@hahdookin
hahdookin / script.vim
Created March 31, 2022 05:50
Example vim9script with jobs
" vim9script that uses jobs to find a word's defintions
" and post them to the quickfix list
" Last Change: 2022 Mar 31
" Maintainer: Christopher Pane <[email protected]>
vim9script
const api = "https://api.dictionaryapi.dev/api/v2/entries/en/"
def OnResponse(ch: channel, msg: string)
const json = json_decode(msg)