Skip to content

Instantly share code, notes, and snippets.

@milesrichardson
milesrichardson / open-vlc-m3u8-url-with-http.md
Created July 10, 2024 21:50
How to use VLC to watch m3u8 playlist at URL with custom HTTP referrer and user agent

Imagine this: it's Sunday afternoon at 1pm, and you want to watch some live content. But you don't have a TV subscription. So you do a little Googling, and eventually you find yourself on a sketchy website where you can watch the content you're looking for. But while the website has a video player, it's surrounded by advertisements, and probably a cryptominer too. You don't want this website eating your CPU for 2 hours while you're watching your favorite Sunday afternoon content.

Wouldn't it be nice if you could watch that video in VLC instead? Then you can close the sketchy website and still watch your content. It's like having your cake and taking a bite of it too!

Here's how you do it:

  1. Capture the m3u8 request in dev tools. Open the site (or just the iframe, if possible) in DevTools and click "play." Search the network tab for m3u8 and grab the first request.

  2. Run VLC with command line flags to set the User Agent and Referrer. From the request body, you need to copy the requested URL,

@rasmi
rasmi / setup.md
Last active June 16, 2024 15:26
Python development environment setup on Chromebook

Python development environment setup on Chromebook

(also works for a minimal Linux install)

Check for updates

Do this first!

sudo apt-get update && sudo apt-get dist-upgrade
@thblt
thblt / hashsync.py
Last active August 6, 2016 15:38
Hashsync: Fast FTP synchronization for static website generators
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Hashsync
# Hash-based synchronization over FTP.
# http://thb.lt/blog/2013/fast-ftp-sync-for-jekyll.html
#
# Copyright (c) 2012-2013 Thibault Polge <http://thb.lt>. All rights reserved.
#