Skip to content

Instantly share code, notes, and snippets.

View jellyfin.md

Jellyfin setup on Raspberry Pi 3 Debian 9(stretch)

Jellyfin is the open source version of Emby.

install docker

wget -nv -O- https://get.docker.com/ | sh
@todgru
todgru / certbot.md
Created Jan 13, 2019
certbot lenscrypt ssl
View certbot.md
@todgru
todgru / bootable-usb-drive.md
Last active Jan 8, 2019
osx debian usb asus 900A EEE PC
View bootable-usb-drive.md

I created a bootable usb drive in disk utility

then ran diskutil list to find the identifier

/dev/disk2s1 in my case

make sure to unmount the drive

then dd

View raspberry-pi-usb-hdd.md

raspberry pi auto mount usb drive

my drive is hfsplus usb 2TB

get the usb UUID from blkid

pretty print drive locations lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

followed this, with special attention to the order. Drive must be unmounted before running fsck.

@todgru
todgru / emby.md
Last active Mar 16, 2019
install emby on a raspbery pi 3
View emby.md
@todgru
todgru / ufw.md
Created Jan 6, 2019
set up ufw to forward requests to port 2222 of server to same server, port 22
View ufw.md

Foward requests to one port to another on the same server

I wanted to forward requests comming to a server on port 2222 to the same server port 22.

I'm using ufw for the firewall on the server.

  1. allow port 22 and 2222 on the server.
$ sudo ufw allow 22
@todgru
todgru / dns-troubleshooting.md
Last active Oct 18, 2019
setting up dnsmasq on raspberry pi nmap ports dns
View dns-troubleshooting.md

Local DNS dnsmasq

Use case

I wanted to have an outside domain name resolve to a computer inside my local private network. I am tyring out duckdns.org to handle the resolution. The DNS resolves fine outside of my local network, yet locally the fqdn will not resolve. To enable this, a local dns needs to handle the request, routing to the local server.

This is where the raspberry pi dns comes in. I'm running Raspbian GNU/Linux 9 (stretch), a Debian variant. http://www.raspbian.org/

NOTE

I have been unable to get dnsmasq to start correctly on reboot. Nothing stands out in daemon.log. sudo service dnsmasq status shows one particular line that is different from the status of a reboot vs a manual service restart:

@todgru
todgru / install.sh
Last active Jan 13, 2019
raspberry pi debian 9 stretch cleanup and nice-to-have package install
View install.sh
# modified version of:
# wget https://gist.githubusercontent.com/samatjain/4dda24e14a5b73481e2a/raw/5d9bac8ec40b94833b4e9938121945be252fdee1/Slim-Raspbian.sh -O Slim-Raspbian.sh
# GUI-related packages
# none right now...
# Edu-related packages
pkgs="
oracle-java8-jdk
minecraft-pi
python-minecraftpi
@lihaoml
lihaoml / starttmux.sh
Last active Dec 17, 2020 — forked from todgru/starttmux.sh
Start up tmux with custom windows, panes and applications running
View starttmux.sh
#!/bin/sh
#
# set up tmux
session="work"
tmux start-server
# create a new tmux session, starting vim from a saved session in the new window
tmux new-session -d -s $session -n bonitor
tmux splitw -v -p 50
@wyllie
wyllie / parse_ini.sh
Created Jul 22, 2018
Parse aws credentials file in bash
View parse_ini.sh
#!/usr/bin/env bash
INI_FILE=~/.aws/credentials
while IFS=' = ' read key value
do
if [[ $key == \[*] ]]; then
section=$key
elif [[ $value ]] && [[ $section == '[default]' ]]; then
if [[ $key == 'aws_access_key_id' ]]; then