Skip to content

Instantly share code, notes, and snippets.

View arthurpizza's full-sized avatar

Arthur Reeder arthurpizza

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.

@oofnikj
oofnikj / answerfile
Last active July 25, 2024 06:25
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@MineBartekSA
MineBartekSA / catbox
Last active June 29, 2024 01:36
CatBox - An implementation of catbox.moe API in Bash
#!/bin/bash
#
# CatBox v2.0
# An implementation of catbox.moe API in Bash
# Author: MineBartekSA
# Gist: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591
# Change log: https://gist.github.com/MineBartekSA/1d42d6973ddafb82793fd49b4fb06591?permalink_comment_id=4596132#gistcomment-4596132
#
# MIT License
#
@max-mapper
max-mapper / readme.md
Last active March 16, 2023 15:18
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@nasser
nasser / atom-shell-arm-build.sh
Last active March 29, 2016 17:51
Cross compile atom-shell to ARM from Ubuntu 14.04
# from https://github.com/atom/atom-shell/blob/master/docs/development/build-instructions-linux.md
# run as root on ubuntu 14.04
# basic deps
apt-get install build-essential clang libgtk2.0-dev libnotify-dev gcc-multilib g++-multilib libgnome-keyring-dev
# node
apt-get install python-software-properties software-properties-common
add-apt-repository ppa:chris-lea/node.js
apt-get update
@adunning
adunning / epub.css
Created August 12, 2014 02:51
Better default epub.css for Pandoc (tested with iBooks)
/* This defines styles and classes used in the book */
body { margin: 0; text-align: justify; font-size: medium; font-family: Athelas, Georgia, serif; }
code { font-family: monospace; }
h1 { text-align: left; }
h2 { text-align: left; }
h3 { text-align: left; }
h4 { text-align: left; }
h5 { text-align: left; }
h6 { text-align: left; }
h1.title { }
@learncodeacademy
learncodeacademy / gist:5f84705f2229f14d758d
Last active July 16, 2024 04:56
Getting Started with Vagrant, SSH & Linux Server Administration
@x1a0
x1a0 / csv2sc.py
Created January 21, 2014 23:18
Convert `.csv` to `.sc`
#!/usr/bin/env python
import sys
import string
if len(sys.argv) < 2:
print "Usage: %s infile [outfile] [delimiter_char]" % sys.argv[0]
sys.exit(1)
filename_in = sys.argv[1]
@DennisLfromGA
DennisLfromGA / screencast
Last active January 3, 2016 09:19
A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider. This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#!/bin/bash -e
## A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider.
#+ This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#+ This 'screencast' modified source (and author) can be found here - (https://gist.github.com/DennisLfromGA/8441689)
# Needs to run in bash so do it.
if [ -z "$BASH_VERSION" ]; then exec bash -e "$0" "$@"; fi
APPLICATION="${0##*/}"
ARGNUM="$#"
@kou1okada
kou1okada / sysbench.log
Last active January 4, 2019 04:51
Intel Core i7-4770 benchmark by sysbench on Ubuntu Desktop 13.04
2013-06-09 14:24:07
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 8
Doing CPU performance benchmark
Threads started!
Time limit exceeded, exiting...