Skip to content

Instantly share code, notes, and snippets.

@andrewssobral
andrewssobral / disable_leds_rpi3.sh
Last active June 21, 2024 15:20
Disable leds on Raspberry Pi 3 Model B Rev 1.2
# https://raspberrypi.stackexchange.com/questions/117632/turn-off-external-leds-on-raspberry-pi-3
# check model
cat /sys/firmware/devicetree/base/model
# Raspberry Pi 3 Model B Rev 1.2
# Disable Power (red) and Activity (yellow) leds
sudo nano /etc/rc.local
# Add the following lines before `exit 0`:
sudo sh -c 'echo none > /sys/class/leds/led0/trigger'
@andey
andey / IPTV M3U filter
Created December 29, 2018 23:56
Filter out the garbage channels, and only show me what I want to see
<?php
// download the file
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "<M3U_LINK>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close ($ch);
// write to file