This file contains 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 | |
# | |
# Tailscale install script on GL.iNet devices | |
# Tested on BERYL (MT1300), should work on MANGO (GL-MT300N) | |
# and probably other mipsel devices, as long as external storage (microSD/USB) | |
# is available. | |
# | |
# Written by Thomas BOHL for Hemisphere-Project - 2022 | |
# Free to use - No warranty provided |
This file contains 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/env python3 | |
import subprocess, os, sys, math | |
####################### | |
def usage(): | |
print("Usage: sudo sd2img /dev/sdx /path/to/image.img") | |
def b_size(size_bytes): |
This file contains 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 | |
# 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 ~/ |
This file contains 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/env python3 | |
import sys, os | |
# total arguments | |
n = len(sys.argv) | |
if n < 2: | |
print("ERROR: please specify the release URL") | |
exit(2) |
This file contains 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 | |
# 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 |
This file contains 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 | |
# 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 |
This file contains 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
## | |
# DYNHOST SCRIPT | |
## | |
> nano /root/dynhost.sh | |
#!/bin/bash | |
name=rpi | |
source /boot/config.txt | |
hostnamectl set-hostname "$name" |
This file contains 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 | |
# 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 | |
} |
This file contains 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
<?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); |
This file contains 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 | |
./HPlayer/HPlayer --path /home/pi/media --start 1 --loop 1 --gl 1 --info 1 | |
sudo poweroff |
NewerOlder