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
@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',
@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"
@tombowditch
tombowditch / tunneling.md
Last active June 9, 2024 18:33 — 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:

@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that
@valyakuttan
valyakuttan / arch_network.md
Last active August 13, 2023 15:27
Arch Linux Network Setup With dnscrypt-proxy

Arch Linux Network Setup With dnscrypt-proxy

Install and Configure iwd

  1. Install iwd and openresolv

         $ sudo pacman -S iwd openresolv
  2. Configure iwd by editing /etc/iwd/main.conf

@Jiab77
Jiab77 / setup-DNS-over-TLS-with-systemd-on-ubuntu-18.04.md
Last active June 27, 2024 21:03
This gist will explain how to setup DNS-over-TLS on your local computer.

Setup DNS-over-TLS with systemd on Ubuntu 18.04

This gist will explain how to setup DNS-over-TLS on your local computer.

Verify systemd version

To make it work, you need at least systemd version 237 or 242.

I'll use the version 242 in this gist.

@themarcba
themarcba / vuejs-like-reactive-state.html
Last active February 5, 2024 11:52
Vue.js-like reactive state
<script>
let activeEffect
class Dep {
subscribers = new Set()
depend() {
if (activeEffect) this.subscribers.add(activeEffect)
}
notify() {
this.subscribers.forEach((sub) => sub())
@johnnypea
johnnypea / useful-one-liners.sh
Last active April 22, 2024 14:56
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@JoshuaJChan
JoshuaJChan / arch-install.sh
Last active April 18, 2023 20:11
script to install Arch Linux
#!/bin/bash
## Assumes ##
# Working internet connection
# Pre-installation work already done
## Instructions ##
# After booting into Arch ISO, run:
# curl -sL https://git.io/JexlX | /bin/bash
# and follow the instructions on the script.
#!/usr/bin/env sh
if test ! -d ./overlay; then
read -p "No overlay found here. Want to create one? (y/N)" yn
case $yn in
[Yy]* ) install -d overlay/upperdir && install -d overlay/workdir && install -d overlay/mnt; break;;
* ) exit;;
esac
fi