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
# via https://github.com/rosterloh/raspberry-pi/blob/master/configs/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it |
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
sudo nano /home/pi/.bash_profile |
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
xserver-command=X -s 0 -dpms |
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
# | |
# apt upgrade rolling everything in one line | |
# | |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get clean && sudo apt-get remove |
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 | |
MSG=`speedtest-cli --simple | perl -pe 's/^(.*): (.*) (.*?)(\/s)?\n/"$1_$3": $2, /m' | cut -d',' -f 1-3` | |
logger "{\"speed\": {$MSG}}" |
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 | |
iptables -t nat -D POSTROUTING -o tun0 -j MASQUERADE |
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
# | |
# --mlock : Disable Paging -- ensures key material and tunnel | |
# data will never be written to disk. | |
# --up-delay : Delay tun/tap open and possible --up script execution | |
# until after TCP/UDP connection establishment with peer. | |
/usr/sbin/openvpn --show-gateway --up-delay --mlock --single-session | |
# outputs: | |
# Fri Dec 22 12:53:52 2017 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=eth0 HWADDR=b8:27:eb:27:5e:e1 |
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/env bash | |
########################################################################### | |
# Originally written by: Henrik Bengtsson, 2014 | |
# https://github.com/HenrikBengtsson/speedtest-cli-extras | |
# Modified to use IFTTT by: Alasdair Allan, 2015 | |
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
########################################################################### | |
# Character for separating values | |
# (commas are not safe, because some servers return speeds with commas) |
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 | |
base="/data/live" | |
cd $base | |
raspivid -n -w 720 -h 405 -fps 25 -vf -t 86400000 -b 1800000 -ih -o - \ | |
| ffmpeg -y \ | |
-i - \ | |
-c:v copy \ |
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
# Local | |
auto lo | |
iface lo inet loopback | |
# Ethernet | |
auto eth0 | |
iface eth0 inet static | |
address 192.168.1.104 | |
netmask 255.255.255.0 | |
gateway 192.168.1.1 |