Skip to content

Instantly share code, notes, and snippets.

View Eriner's full-sized avatar

Matt Hamilton Eriner

View GitHub Profile
@cutiful
cutiful / mastodon-ip.md
Last active March 21, 2024 04:00
Detecting the real IP of a Cloudflare'd Mastodon instance

Detecting the real IP of a Cloudflare'd Mastodon instance

NB: This will not work for instances that proxy outgoing requests!

Reading the docs

I wanted to find a way to detect the real IP address of a Mastodon/Pleroma/Misskey/etc instance hosted behind Cloudflare. How to do that? Well, it's federated, which means I can probably get it to send a request to a server of mine! And how to do that? I tried reading the ActivityPub spec. The following caught my attention:

Servers should not trust client submitted content, and federated servers also should not trust content received from a server other than the content's origin without some form of verification.

@cryzed
cryzed / fix-infinality.md
Last active January 19, 2024 08:56
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

#!/usr/bin/env python3
"""Usage: vimcrypt.py [FILE]...
Guesses first 64 bytes of vim-encrypted files. Method implemented is sufficient
for plain English (preferably with lots of spaces), but any knowledge of
underlying plaintext would do.
Example:
$ ./vimcrypt.py 1.txt 2.txt 3.txt 4.txt
@geyslan
geyslan / shell_bind_tcp.asm
Last active October 7, 2023 10:00
Shell Bind TCP in Assembly (Linux/x86) - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.asm
global _start
section .text
_start:
; syscalls (/usr/include/asm/unistd_32.h)
; socketcall numbers (/usr/include/linux/net.h)