Skip to content

Instantly share code, notes, and snippets.

View zopieux's full-sized avatar

Alexandre Macabies zopieux

View GitHub Profile
@Informatic
Informatic / README.md
Last active April 29, 2024 11:18
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@marcan
marcan / turnitdown.py
Last active July 18, 2023 16:41
Add Spotify volume normalization to Google Cast devices
#!/usr/bin/python3
#
# turnitdown.py - normalize Spotify playback volume on Google Cast devices
#
# Dependencies: pychromecast, spotipy
#
# Usage: register a Spotify app and put the credentials in the
# SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET environment variables.
# Then just launch the script. It will autodetect all cast devices
# on the network.
@acdha
acdha / simple_cors_server.py
Last active May 3, 2024 22:08
Python 3: serve the current directory as HTTP while setting CORS headers for XHR debugging
#!/usr/bin/env python3
# encoding: utf-8
"""Use instead of `python3 -m http.server` when you need CORS"""
from http.server import HTTPServer, SimpleHTTPRequestHandler
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
@thejhh
thejhh / ram-leaking.md
Created January 24, 2012 20:42
Testing btrfs snapshots and git on ramdisk (tmpfs)

Why does deleting a snapshot increase the used space on btrfs filesystem?

# time ./transaction-test.sh
DEBUG   452     work_begin: before snapshot creation
DEBUG   452     snapshot_create: before sync
DEBUG   408     snapshot_create: before snapshot creation
DEBUG   412     snapshot_create: after snapshot creation
DEBUG   412     work_begin: before changing pwd
DEBUG   412     work_begin: after changing pwd
DEBUG 412 do_test: before test