Skip to content

Instantly share code, notes, and snippets.

# burn the image to the pi with etcher/rufus
# connect the sdcard to your computer
# add following files to the boot partition:
# MAKE SURE THEY HAVE LINUX LF (NO CRLF)
# /wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE
@Sonnenhut
Sonnenhut / draggable.html
Created October 28, 2018 14:43
Draggable rotating div
<html>
<head>
<style>
#draggable {
width: 100px;
height: 100px;
background-color: lightgrey;
position: absolute;
user-select: none;
}
import pi2go
import time
def moveRight():
pi2go.setLED(0, 0, 0, 0)
pi2go.setLED(1, 4095, 0, 0)
pi2go.setLED(2, 0, 4095, 0)
pi2go.setLED(3, 4095, 4095, 4095)
pi2go.go(power, power - turnPower)
@Sonnenhut
Sonnenhut / start-emulationstation.sh
Last active April 16, 2016 00:08
Script for integrating emulationstation safely inside xbmc on the xbian system. Kodi starts again, when emulationstation is closed.
#!/bin/bash
#service xbmc stop only works if the output is redirected..
echo > /home/xbian/start-emulationstation.log
exec >> /home/xbian/start-emulationstation.log
exec 2>&1
echo raspberry| sudo -S service xbmc stop
#my custom script for connecting to bluetooth controllers
/home/xbian/connect-controllers.sh
echo connected bluetooth
@Sonnenhut
Sonnenhut / ffmpeg-deshake
Last active January 24, 2016 15:16
deshake input video from Xiaomi yi
ffmpeg -i "YDXJ0130.mp4" -vf vidstabdetect=shakiness=5:show=1 out.mp4
ffmpeg -i "YDXJ0130.mp4" -vf vidstabtransform -y out.mp4
#ffmpeg -i "YDXJ0130.mp4" -vf deshake out.avi
@Sonnenhut
Sonnenhut / youtube-search
Created January 18, 2016 22:00
Searches for a youtube link
@Sonnenhut
Sonnenhut / youtube-dl-playlist.cmd
Last active August 29, 2015 14:25
youtube-dl: download all mp3's from a playlist
#make sure ffmpeg is available via path variable (command line)
python youtube-dl PL3F7E9E7CCA5B4E28 -i -x --audio-format mp3 -o "./mp3/%(title)s.mp3