Skip to content

Instantly share code, notes, and snippets.

@SebaUbuntu
SebaUbuntu / README.md
Last active April 18, 2025 18:34
Generate framework compatibility matrix from fqnames

Generate framework compatibility matrix from fqnames

  • Download these 2 files
  • Compile AOSP without fcm from stock and wait for check_vintf to error out
  • Delete Python prefix from all lines (e.g. checkvintf E 06-24 00:30:22 49120 49120 check_vintf.cpp:554])
  • Paste the result in fqnames.txt
  • Launch the script
@panzi
panzi / gist:7551381
Created November 19, 2013 19:49
Download currently playing HTML5 audio/video bookmarklet.
Create a new bookmark and set it's URL to this:
javascript:(function(xs)%7Bfor(var%20i%3D0%3Bi%3Cxs.length%3B%2B%2Bi)%7Bif(xs%5Bi%5D.currentSrc)%7Breturn%20window.open(xs%5Bi%5D.currentSrc)%3B%7D%7D%7D)(document.querySelectorAll('audio%2Cvideo'))%3B
When media is playing using HTML5 audio/video you can click this bookmark to open a new tab/window with the media. Then to download it use the context menu action "Save As..." (right mouse button -> Save As...).
If you use Chrome/Safari/recent Opera (WebKit/Blink) you can do better(!) and immediately download the file using this bookmarklet instead:
javascript:(function(xs)%7Bfor(var%20i%3D0%3Bi%3Cxs.length%3B%2B%2Bi)%7Bif(xs%5Bi%5D.currentSrc)%7Bvar%20a%3Ddocument.createElement('a')%3Ba.target%3D'_blank'%3Ba.download%3D''%3Ba.href%3Dxs%5Bi%5D.currentSrc%3Ba.click()%3Breturn%3B%7D%7D%7D)(document.querySelectorAll('audio%2Cvideo'))%3B
@fabiojmendes
fabiojmendes / main.nft
Last active April 18, 2025 18:26
Nftables configuration that plays nice with podman
# This config is based on the original nftables
# config that ships with fedora/rocky/rhel
# Added podman_allowed so it works with podman
# Sample configuration for nftables service.
# Load this by calling 'nft -f /etc/nftables/main.nft'.
# Note about base chain priorities:
# The priority values used in these sample configs are
# offset by 20 in order to avoid ambiguity when firewalld
@dillionverma
dillionverma / lucide-react.d.ts
Last active April 18, 2025 18:24
How to stop @radix-ui, next/router and lucide-react auto-imports
declare module 'lucide-react' {
export * from 'lucide-react/dist/lucide-react.suffixed'
}
@Alevsk
Alevsk / install-docker.yaml
Last active April 18, 2025 18:24
Ansible playbook to install docker
- hosts: "{{ HOSTS }}"
name: Install Docker
become: yes
vars:
docker_group: docker
tasks:
- name: Install apt-transport-https
ansible.builtin.apt:
name:
- apt-transport-https
@sora10pls
sora10pls / Titan Randomizer.cs
Last active April 18, 2025 18:20
A Randomizer for Pokémon Scarlet and Pokémon Violet
// PATHS
private static string DEST_MASTER = @"";
private static string PATH_MASTER = @"";
private static string PATH_TRPFD = @"";
private static string DEST_LOG = @"";
private static string LANGUAGE = "English";
// RANDOMIZER GENERATION SETTINGS
private static bool AUTOMATICALLY_PATCH_TRPFD = true;
private static bool GENERATE_RANDOMIZER_LOG_FILE = true;
@mbleigh
mbleigh / README.md
Last active April 18, 2025 18:17
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>

yt-dlp termux full installation guide.md

Prepare

  1. Install Termux from Github: https://github.com/termux/termux-app/releases
  2. Download the apk and install it -> Note that installing termux from Play Store is highly discouraged.

In Termux:

pkg update
@esotericenderman
esotericenderman / dice.ts
Last active April 18, 2025 18:20
A microbit dice.
// A microbit dice.
input.onGesture(Gesture.Shake, () => {
basic.showNumber(randint(1, 6));
});
#!/usr/bin/env python3
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv