Skip to content

Instantly share code, notes, and snippets.

@EchedelleLR
EchedelleLR / ffmpeg-to-vp8-720p-example.txt
Last active November 19, 2024 19:11
Ffmpeg quick VP8 encoding to 720p
# GPLv3.0
find /original/path/ -type f | xargs -I "{}" -P 1 sh -c 'rm /destination/path/"$(basename "{}" | cut -f -3 -d '.')".original_extension; ffmpeg -i "{}" -vf "scale=-1:720,fps=24" -c:a libvorbis -c:v libvpx -ar 48k -b:v 1M -b:a 128k -crf 30 -pix_fmt yuv420p -deadline realtime -cpu-used 0 /destination/path/"$(basename "{}" | cut -f -3 -d '.')".destination_extension'
#!/bin/bash
OUTPUT_DIR=""
INPUT_FILE=""
ZOOM=0.7
WIDTH=1080
HEIGHT=1080
ROTATE_X=0
ROTATE_Z=45
ROTATION=360 # Total rotation angle
@yewtudotbe
yewtudotbe / what-happened-downtime-july2023.md
Last active April 24, 2025 08:24
Why yewtu.be was down? (July 2023)

On the 30th of June, my cloud provider, Oracle Cloud, decided to shutdown all my servers hosted on two Oracle Cloud accounts.
It is known that this provider will randomly ban accounts without any reason.

Why yewtu.be doesn't accept new registrations nor logging into an account?

Unfortunately and this is 100% my fault for forgetting that, I only had data duplication between servers located in the two Oracle Cloud accounts and no backups.
I thought that I wouldn't get all my accounts in trouble at the same time and able to recover the data from one of the two accounts but unfortunately this turned out otherwise.

Implementing some backup was something I had in my notes for a long time but I think I forgot about it, maybe due to the huge amount of work I spend on the open source projects.
I'm deeply sorry if you have lost your subscriptions list or playlists or watch history. I did try to contact Oracle Cloud for recovering the data, I'm waiting for their answer but you should be certain that they

@Kurty00
Kurty00 / download mastodon instance emoji.js
Last active April 16, 2023 19:41
Downloads Mastodon Emoji
getEmoji("fedi.fun");
function loadJSON(url, callback) {
var xhr = new XMLHttpRequest();
xhr.overrideMimeType("application/json");
xhr.open("GET", url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
callback(xhr.responseText);
}
@eloylp
eloylp / Fedora35Hibernation.md
Last active May 4, 2025 03:35
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 6, 2025 14:33
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android πŸ‹πŸ“±

Edit πŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@apivovarov
apivovarov / riscv-debian.md
Last active April 4, 2025 13:16
Run RISC-V Debian via QEMU #riscv #qemu

Run RISC-V Debian GNU/Linux bullseye/sid via QEMU.

  1. Run the latest version of Debian on regular x86_64 box (at least ver 10 Buster, better to run ver 11 Bullseye)
  2. If opensbi and u-boot-qemu packages are not found add testing apt repository (aka bullseye). Or even unstable (aka sid)
sudo vi /etc/apt/sources.list

# Add testing repo (or unstable)
deb http://cdn-aws.deb.debian.org/debian testing main
deb-src http://cdn-aws.deb.debian.org/debian testing main
@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active December 31, 2024 13:29
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@ramuta
ramuta / sudo_brute_force.py
Last active April 8, 2024 05:12
A Python script to brute force the sudo password of a current user.
# Author: Matej Ramuta
# How to use this script:
# 1. You need to have a wordlist file, something like rockyou.txt
# 2. Make sure you have Python 3 installed. Try this with "python --version" command. Also check "python3 --version"
# 3. Run the script like this: python sudo_brute_force.py passwords.txt
import os
import sys
if len(sys.argv) == 1:
@FinnWoelm
FinnWoelm / read-text-message.sh
Created December 27, 2019 14:01
How to read text messages from USB modem
# Full instructions: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html
# Examples: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html#examples
# Supported modems: https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/
# Get list of connected modems.
mmcli --list-modems
# Output:
# Found 1 modems:
# /org/freedesktop/ModemManager1/Modem/1 [huawei] E3531
# The number at the end of the path is the modem index.