Skip to content

Instantly share code, notes, and snippets.

Maigre Maigre

Block or report user

Report or block Maigre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Maigre
Maigre / dynhost.sh
Last active May 8, 2018
RPi change hostname at boot
View dynhost.sh
##
# DYNHOST SCRIPT
##
> nano /root/dynhost.sh
#!/bin/bash
name=rpi
source /boot/config.txt
hostnamectl set-hostname "$name"
View usb-automount.sh
#!/bin/bash
# This script is called from our systemd unit file to mount or unmount
# a USB drive.
usage()
{
echo "Usage: $0 {add|remove} device_name (e.g. sdb1)"
exit 1
}
View Github Pull Hook
<?php
// the shared secret, used to sign the POST data (using HMAC with SHA1)
$secret = '----------------';
$command = "cd wp-content/themes/mytheme/ && git stash && git pull";
// receive POST data for signature calculation, don't change!
$post_data = file_get_contents('php://input');
$signature = hash_hmac('sha1', $post_data, $secret);
View hplayer-launcher.sh
#!/bin/bash
./HPlayer/HPlayer --path /home/pi/media --start 1 --loop 1 --gl 1 --info 1
sudo poweroff
View MPV build Ubuntu 14.04
# libass dependencies
sudo apt install libfreetype6-dev libfribidi-dev libfontconfig1-dev
# ffmpeg dependencies
sudo apt install yasm libx264-dev
# mpv dependencies
sudo apt install libvdpau-dev libva-dev libxv-dev libjpeg-dev libxkbcommon-dev libxinerama-dev libxrandr-dev libgles2-mesa-dev libgles1-mesa-dev libv4l-dev libxss-dev libgl1-mesa-dev libgl2-mesa-dev
# lua
View MPV build
sudo apt update && sudo apt upgrade -y
sudo apt install git libtool build-essential pkg-config autoconf libfribidi-dev liblua5.1-0-dev libluajit-5.1-dev libv4l-dev libvdpau-dev libva-dev libxv-dev libxcb-xfixes0-dev libsdl1.2-dev libjpeg-dev libenca-dev libxcb-render0-dev libwayland-dev libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libxkbcommon-dev libxinerama-dev libxrandr-dev libxss-dev libgl1-mesa-dev fonts-dejavu-core libaacs-dev libass-dev libbluray-dev libbs2b-dev libcdio-cdda-dev libcdio-paranoia-dev libfontconfig1-dev libcaca-dev libx264-dev libasound2-dev libegl1-mesa-dev libgles2-mesa-dev libgles1-mesa-dev libx11-dev -y
git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
echo --enable-libmpv-shared > mpv_options
echo --enable-mmal >> ffmpeg_options
./rebuild -j4
sudo ./install
View HPlayer_install_arch
#!/bin/bash
# UPDATE RPI
sudo pacman -Syu --noconfirm
sudo pacman -S --needed base-devel --noconfirm
sudo pacman -S git --noconfirm
# COMPILE FLAGS
export MAKEFLAGS=-j4 PLATFORM_ARCH=armv7l PLATFORM_VARIANT=raspberry2
View HPlayer_install_debian
#!/bin/bash
# UPDATE RPI
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install git -y
# OPENFRAMEWORK
cd ~/
View RPi-omxlooper
#!/bin/bash
# https://blog.kmp.or.at/build-your-own-raspberry-pi-image/
# https://hallard.me/raspberry-pi-read-only/
# http://blog.fraggod.net/2015/11/28/raspberry-pi-early-boot-splash-logo-screen.html
# https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=127042
# http://www.edv-huber.com/index.php/problemloesungen/15-custom-splash-screen-for-raspberry-pi-raspbian
apt-get install -y omxplayer usbmount
You can’t perform that action at this time.