Skip to content

Instantly share code, notes, and snippets.

View update-m3u.ps1
#
# Update all m3u files
# Arguments: working directories
#
$extensions = @(".mp3", ".m4a", ".flac")
$Args | % {
ls -r $_ | ? { $_.Extension -eq ".m3u" } | % {
$listfile = $_
pushd $listfile.Directory
"#EXTM3U" | Out-File $listfile -Encoding utf8
@taqpan
taqpan / IR-sender.ino
Created Jul 12, 2014
IR-signal sender for Arduino
View IR-sender.ino
#define PIN_IR_OUT 4
#define PIN_LED_OUT 2
#define SIGNAL_LEN 7
// AEHA format
#define SIGNAL_LEADER_HIGH_TIME 3200
#define SIGNAL_LEADER_LOW_TIME 1600
#define SIGNAL_ON_HIGH_TIME 400
#define SIGNAL_ON_LOW_TIME 1200
#define SIGNAL_OFF_HIGH_TIME 400
@taqpan
taqpan / IR-Receiver.ino
Created Aug 19, 2012
IR-signal receiver for Arduino with PL-IRM-2161-C438
View IR-Receiver.ino
#define PIN_LED_OUT 7
#define PIN_IR_IN 8
// NEC format
/*
#define SIGNAL_LEADER_HIGH_TIME 16
#define SIGNAL_LEADER_LOW_TIME 8
#define SIGNAL_TIMEOUT 8000
//*/
@taqpan
taqpan / Raw-IR-Receiver.ino
Created Aug 19, 2012
Raw IR-signal receiver for Arduino with PL-IRM-2161-C438
View Raw-IR-Receiver.ino
#define PIN_IR_IN 8
#define SIGNAL_TIMEOUT 8000
#define DATA_LEN 512
short buf[DATA_LEN];
void clearBuf(int range)
{
for (int i = 0; i < range; i++)
buf[i] = 0;
You can’t perform that action at this time.