This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified adalight arduino version which uses the FastLED ( http://fastled.io/ ) library. | |
# I found this code at https://forums.adafruit.com/viewtopic.php?f=47&t=59464#p301431 . | |
# For me it works much more smooth then the original code using SPI.h . | |
# It works pretty well with Colorswirl boblight and hyperion | |
#include "FastLED.h" | |
#include <hsv2rgb.h> | |
#include <platforms.h> | |
#include <fastspi_types.h> | |
#include <colorpalettes.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uses Adalight protocol and is compatible with Boblight, Prismatik etc | |
// "Magic Word" for synchronisation is 'Ada' followed by LED High, Low and Checksum | |
// source http://thai-fighter.blogspot.de/2014/05/arduino-adalight-clone-with-any-led.html | |
// | |
#include <FastLED.h> | |
///// User definitions ///// | |
// Define the number of LED Controllers | |
#define NUM_LEDS 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in "*.m4a"; do echo ffmpeg -i $i -ab 192k "$(basename -s .m4a $i).mp3"; done | |
or | |
for i in *.m4a; do out=`echo $i | cut -d '.' -f1`; ffmpeg -i $i -ab 192k $out.mp3; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
confdir="`dirname "$0"`/../" | |
. $confdir/default-config.sh | |
if [ -f $confdir/config.sh ]; then | |
. $confdir/config.sh | |
fi | |
ffmpeg -y -nostdin \ | |
-i - \ | |
-ac 2 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl https://media.ccc.de/c/gpn17/podcast/mp4.xml | awk -F '"' '/url="/{print $2}' | wget -c -i - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import time | |
import threading | |
import os | |
import stat | |
import gi | |
gi.require_version('Gst', '1.0') | |
gi.require_version('GstNet', '1.0') | |
from gi.repository import Gst, GstNet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -y -i in.mkv -map 0:v -c:v copy -map 0:a:0 -c:a:0 copy -map 0:a:0 -c:a:0 ac3 out.mkv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MIN_SIZE=6G | |
IN_DIR=. | |
OUT_DIR=out | |
find $IN_DIR -maxdepth 1 -type f -size +$MIN_SIZE -exec ffmpeg -y -i {} -c:v libx264 -preset slow -tune film -profile:v high -level 4.2 -crf 23 -c:a copy -c:s copy $OUT_DIR/{} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR1=~/bar/ | |
DIR2=~/foo/ | |
SIZE1=0 | |
SIZE2=0 | |
for file in $DIR1*; do | |
file2=$DIR2$(basename "$file") | |
if [[ -f $file ]] && [[ -f $file2 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This can be used as a starting point for developing your own image e.g. for running MirageOS on an Pi3 | |
You will need an arm64 / aarch64 cross compiler. You can use e.g. the cross compiler shipped by Ubuntu or get the toolchain of your choice for your OS. | |
apt-get install gcc-aarch64-linux-gnu | |
Now we setup the SD card. We need to create two partitions like shown below | |
Device Boot Start End Sectors Size Id Type | |
2018-03-13-raspbian-stretch-lite.img1 8192 93802 85611 41,8M c W95 FAT32 (LBA) |
OlderNewer