Skip to content

Instantly share code, notes, and snippets.

View rmdes's full-sized avatar
💭
Learning, Groking, Exploring

Ricardo rmdes

💭
Learning, Groking, Exploring
View GitHub Profile
@cutiful
cutiful / mastodon-ip.md
Last active August 31, 2025 17:41
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.

@AugustoCiuffoletti
AugustoCiuffoletti / UbuntuMini.md
Last active July 31, 2024 12:47
A script to produce a minimal Ubuntu image for VirtualBox (without the mini.iso)

Living without the Ubuntu mini.iso (in VirtualBox)

The mini.iso for the Ubuntu distribution is legacy since version 20.04LTS (Focal Fossa). This is a bad news for those (like me) that formerly used this distribution to produce lightweight virtual machines for development, teaching, testing, etc. A distribution of the mini.iso for Ubuntu 20.04 is indeed still available here, but there is no guarantee that its availability will continue after Focal Fossa. An askubuntu post on the topic (there are several) is here.

So I decided to find a way to do without the mini.iso, and I wrote this script that takes to the ''tasksel'' step starting from a cloud image in the ubuntu repository. You have many options here about the image format to use: I refer to the .ova file that you find in fo

@nil0x42
nil0x42 / Awesome_GitHub_OSINT.md
Last active February 17, 2024 16:49
Awesome GitHub OSINT
@nd3w
nd3w / install-nginx-mariadb-phpfpm-on-ubuntu-20.04.md
Last active July 23, 2025 03:22
How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

This is a way to install and set up Nginx, MariaDB and PHP-FPM on Ubuntu 20.04.

NOTE: This has been prepared for ease of use in mind, not security, mostly in development machine. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead.

First fetch the latest package list of Ubuntu:

$ sudo apt update
@rordi
rordi / root-password-MariaDB-docker-compose.md
Last active May 20, 2025 14:23
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d
sudo install_name_tool -change @rpath/../bin/libobs.0.dylib @executable_path/../Frameworks/libobs.0.dylib /Library/Application\ Support/obs-studio/plugins/StreamDeckPlugin/bin/StreamDeckPlugin.so
sudo install_name_tool -change @rpath/../bin/libobs-frontend-api.dylib @executable_path/../Frameworks/libobs-frontend-api.dylib /Library/Application\ Support/obs-studio/plugins/StreamDeckPlugin/bin/StreamDeckPlugin.so
sudo install_name_tool -change @rpath/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets /Library/Application\ Support/obs-studio/plugins/StreamDeckPlugin/bin/StreamDeckPlugin.so
sudo install_name_tool -change @rpath/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui /Library/Application\ Support/obs-studio/plugins/StreamDeckPlugin/bin/StreamDeckPlugin.so
sudo install_name_tool -change @rpath/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore /Library/Application\ Support/obs-studio/plugins/StreamDeckPlugin/bin/StreamDeckPlugin
@kayiwa
kayiwa / diffengine_installer
Last active February 2, 2021 13:07
Diffengine Installer
## install phantom JS (#ref https://tecadmin.net/install-phantomjs-on-ubuntu/)
* As superuser capable account do the following
```
sudo -s
sudo apt -y update
sudo apt -y install build-essential chrpath libssl-dev libxft-dev
sudo apt -y install libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
@movalex
movalex / toggle_swap.sh
Last active September 6, 2022 09:18 — forked from Jekis/toggle_swap.sh
Empty swap. Clear swap. Move swap to RAM. Ubuntu.
#!/bin/bash
function calc_percentage () {
mem="$1"
total="$2"
if [[ $mem -gt 0 ]]; then
return $((mem * 100 / total))
else
return 0
fi
repo=""
state="all"
type="all"
numerical=false
username=''
githubKey=''
print_usage() {
echo "Usage: "
@EBendinelli
EBendinelli / change_peertube_categories.md
Last active December 22, 2023 07:25
Change PeerTube categories

How to change PeerTube categories

Works for already installed instances. Useful if you are using peertube within an organization and want to change the default categories to have your own.

  • Stop PeerTube

service peertube stop

  • Log wiht postgres user

sudo -u peertube -i