Skip to content

Instantly share code, notes, and snippets.

View axeldelafosse's full-sized avatar

Axel Delafosse axeldelafosse

View GitHub Profile
@axeldelafosse
axeldelafosse / write_style_to_genre.py
Created February 8, 2023 23:31
Write the ID3v2.4 tag `TXXX:STYLE` to `TCON`
import sys
import mutagen
def write_style_to_genre(input_path):
# Open the file
file = mutagen.File(input_path)
print(file.tags.pprint())
# Check if the file has a STYLE tag
@axeldelafosse
axeldelafosse / convert.sh
Created December 21, 2022 23:42
Convert an audio file to a video file, ready to upload on YouTube. WAVE, AIFF and FLAC to MP4 using a loop of the cover art in H.264 and audio in ALAC
#!/bin/bash
SUPPORTED_FILES=('.wav' '.wave' '.aif' '.aiff' '.flac')
INPUT_PATH=$1
BASE_PATH=${INPUT_PATH##*/}
FILE_EXTENSION=
FILE_NAME=
setup_file() {
@axeldelafosse
axeldelafosse / puppeteer-google-play-cookies.js
Created April 3, 2022 13:31
Scrape your Google Play Console cookies with Puppeteer 🍪
import puppeteer from 'puppeteer-extra';
import StealthPlugin from 'puppeteer-extra-plugin-stealth';
async function scrapeGooglePlayCookies() {
console.log('Scraping Google Play cookies...');
const browser = await puppeteer.use(StealthPlugin()).launch({
headless: false,
executablePath: process.env.PUPPETEER_EXEC_PATH,
args: [
@axeldelafosse
axeldelafosse / react-native-mmkv-plugin.js
Last active October 12, 2023 19:57
[DEPRECATED] React Native MMKV - Config plugin for Expo. You need to use "react-native-mmkv": "^1.6.2"
// DEPRECATED
const {
withDangerousMod,
WarningAggregator,
AndroidConfig,
withAppBuildGradle,
} = require("@expo/config-plugins");
const path = require("path");
const fs = require("fs");
@axeldelafosse
axeldelafosse / DisplayProductID-6604
Created April 30, 2021 09:42
Copy this plist file to /Library/Displays/Contents/Resources/Overrides/DisplayVendorID-6f3 to patch AWS Nitro D-1 display EDID
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisplayProductID</key>
<integer>26116</integer>
<key>DisplayProductName</key>
<string>AWS Nitro D-1</string>
<key>DisplayVendorID</key>
<integer>1779</integer>
@axeldelafosse
axeldelafosse / expo-preview.yml
Last active March 22, 2023 11:06
Expo Preview Deployment for your PRs. For Expo Managed
name: Expo Preview
on: [pull_request]
jobs:
preview:
name: Deploy Pull Request
runs-on: ubuntu-latest
steps: