Skip to content

Instantly share code, notes, and snippets.

@emlautarom1
emlautarom1 / add_alacritty_to_context_menu.reg
Last active November 12, 2021 09:05
Add alacritty to Windows context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty]
@="Open Alacritty here"
"Icon"="C:\\programdata\\chocolatey\\bin\\alacritty.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty\command]
@="\"C:\\programdata\\chocolatey\\bin\\alacritty.exe\" \"--working-directory\" \"%V%\""
@jiajie-chen
jiajie-chen / setup-git-credential-netrc.md
Last active May 6, 2024 17:15
How to setup git-credential-netrc with encrypted .netrc credentials
@wilmardo
wilmardo / jackett.md
Created October 29, 2019 13:08
Jackett add public indexers all in one go

Source: Jackett/Jackett#1576 (comment)

From the Jackett page, click the "add indexer" button so that the pop up window with the full list of indexers appears.

You'll then need to open your browser's development toolbar (in Chrome just hit F12) and go to the JavaScript Console and enter the following:

////hack to add all free indexers in Jackett
$(document).ready(function () {
	EnableAllUnconfiguredIndexersList();
@probonopd
probonopd / Wayland.md
Last active April 28, 2025 23:35
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@ZipFile
ZipFile / README.md
Last active April 25, 2025 04:38
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

[global]
font = Iosevka Term 11
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
@umbernhard
umbernhard / arch-secure-install.md
Last active April 14, 2025 12:57
Building a Secure Arch Linux Device

Building a Secure Arch Linux Device

Locking down a linux machine is getting easier by the day. Recent advancements in systemd-boot have enabled a host of features to help users ensure that their machines have not been tampered with. This guide provides a walkthrough of how to turn on many of these features during installation, as well as reasoning for why certain features help improve security.

The steps laid out below draw on a wide variety of existing resources, and in places I'll point to them rather than attempt to regurgitate full explanations of the various security components. The most significant one, which I highly encourage everyone to read, is Rod Smith's site about secure boot, which is the most comprehensive and cogent explanation of UEFI, boot managers and boot loaders, and secure boot. Another incredibly useful resources is Safeboot, which encapsulates many of the setup steps below in a Debian application.

@nitred
nitred / optimal_mtu.md
Last active April 28, 2025 00:42
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@pgrepds
pgrepds / gist:7c9a7e29a8b649369951e2002a85a3d0
Last active January 25, 2025 07:40
Matlab R2022a ArchLinux installer problem fix
I got problems installing Matlab R2022a on Arch. Running the installer throws the following error:
```
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127
fish: Job 1, 'sudo ./install' terminated by signal SIGABRT (Abort)
```
I fixed it by running the following commands.
@envolution
envolution / PKGBUILD
Last active January 5, 2025 23:15
python-msgspec
# Maintainer: rumpelsepp <stefan at rumpelsepp dot org>
# Contributor: Carl Smedstad <[email protected]>
# Contributor: envolution
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=python-msgspec
_pkgname=${pkgname#python-}
pkgver=0.19.0
pkgrel=1
pkgdesc="A fast and friendly JSON/MessagePack library, with optional schema validation"