Skip to content

Instantly share code, notes, and snippets.

View ShadowJonathan's full-sized avatar
🌈
eternal pronth

Jonathan de Jong ShadowJonathan

🌈
eternal pronth
View GitHub Profile
@ShadowJonathan
ShadowJonathan / server.nginx
Created March 24, 2024 12:24
mastodon user federation request prioritisation
map $request_uri $ap_resource_user {
~^/@(\w+)$ $1;
~^/@(\w+)/\d+$ $1;
~^/users/(\w+)$ $1;
~^/users/(\w+)/\w+$ $1;
~^/users/(\w+)/statuses/\d+$ $1;
default "";
}
@ShadowJonathan
ShadowJonathan / .bashrc
Last active March 20, 2024 19:26
Keygen Church MOTD
# Add this to the end of your .*rc file (dependent on your shell)
echo "\033[31m"
cat ~/keygen_church.ascii.txt
echo "\033[0m"
echo " PRAISE THE CODE"
echo
:root {
--visibility-global: #1976d2;
--visibility-unlisted: #388e3c;
--visibility-follower: #ffa000;
--visibility-private: #d32f2f;
}
.hicolor-privacy-icons .compose-form:has(.compose-form__dropdowns .dropdown-button .icon-globe) button[type=submit],
.hicolor-privacy-icons .secondary-post-button:has(svg path[d^="M480-80q-83"]) {
background-color: var(--visibility-global);
@ShadowJonathan
ShadowJonathan / haproxy.cfg
Last active April 3, 2024 19:08
A reverse proxy daisy chain config that buffers fediverse traffic
# Place this after your default configuration
frontend fedi_fe
mode http
# this is the address that haproxy will listen on,
# when doing this local loopback, its recommended to set to localhost (127.0.0.1)
bind 127.0.0.1:28080
default_backend fedi_fe
@ShadowJonathan
ShadowJonathan / fix_accounts.py
Last active August 1, 2023 14:01
Fix Mastodon Domain Block Lift Glitch
from mastodon import Mastodon
# Create an application, and fill in these parameters with that.
# You should at least have the following permissions;
# - read
# - admin:read
# - admin:read:accounts
# - admin:write
# - admin:write:accounts
mastodon = Mastodon(
@ShadowJonathan
ShadowJonathan / rant.md
Created March 28, 2022 16:56
IPFS Rant

A rant I posted in the Jupiter Broadcasting Unplugged feedback room


Re 449: about IPFS, I do have some comments/feedback, and some warnings;

IPFS in general was supposed to be a multi-language Thing, however, as of yet, only a golang and a JS version exists. Begin 2020 I was looking to change that, wanting to see python added to the mix (because python is imo a much better language to experiment on), so I started poking at py-libp2p, and through a combination of discussion, talks, and just seeing who or where the maintainers were contributing things, I discovered that IPFS was ran on money, and not the good kind of money.

Py-libp2p (libp2p being a library that was supposed to unify all peer to peer communication in a collaborative way, but is now just a repo merge away from codebase isolation irrelevance) was maintained by ethereum developers, who saw it as a fancy new library to piggyback another client onto, but couldn’t care less for the IPFS usecase itself. That’s kinda fine… if they did not dom

@ShadowJonathan
ShadowJonathan / readme.md
Last active June 29, 2022 18:54
`conduit_migrate` WIP docs

Use the following to install or update conduit_migrate;

cargo install --locked --git https://github.com/shadowjonathan/conduit_toolbox conduit_migrate

This'll place it in ~/.cargo/bin, make sure you have this on your $PATH, see rustup documentation for more info.

You can choose a origin database format and a destination database format, the current ones are;

  • heed
  • sqlite
@ShadowJonathan
ShadowJonathan / readme.md
Created January 24, 2022 14:16
`conduit_migrate` WIP docs

Use the following to install or update conduit_migrate;

cargo install --locked --git https://github.com/shadowjonathan/conduit_toolbox conduit_migrate

This'll place it in ~/.cargo/bin, make sure you have this on your $PATH, see rustup documentation for more info.

You can choose a origin database format and a destination database format, the current ones are;

  • heed
  • sqlite
@ShadowJonathan
ShadowJonathan / fix-vlc.service
Created November 22, 2021 10:38
Systemd service to fix vlc spamming syslog after wakeup
# /etc/systemd/system/fix-vlc.service
[Unit]
Description=Fix VLC
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target sleep.target
[Service]
User=root
Type=oneshot
ExecStart=-/usr/bin/killall vlc
TimeoutSec=10
@ShadowJonathan
ShadowJonathan / report.py
Created June 7, 2020 16:35
discord.py member-join prettifier
from datetime import timezone, datetime, timedelta
import humanize
from discord import Member, Embed
GREEN = ":green_square:"
YELLOW = ":yellow_square:"
ORANGE = ":orange_square:"
RED = ":red_square:"