Skip to content

Instantly share code, notes, and snippets.

@itapai
itapai / gist:72973097322de58e79e084d02e0d71d7
Last active April 28, 2022 07:39
setup rpi-tv-looper-omx-bullsht
#!/bin/bash
[[ $EUID -ne 0 ]] && echo "This script must be run as root." && exit 1
apt install -y git vim fbi
# install omxplayer
curl -fsSL https://gist.githubusercontent.com/itapai/a18e58c04c5b67e936c8ad6fc374eb14/raw | bash
# switch to fake kms
#!/bin/bash
while true; do
for f in $1/*.mp4; do
omxplayer -o local $f >/dev/null
done
done
[Unit]
Description=Video loop
After=local-fs.target
[Service]
ExecStartPre=/bin/mkdir -p /media/videos
ExecStart=/opt/play.sh /media/videos
[Install]
WantedBy=multi-user.target
@itapai
itapai / gist:d6b34dd5250867fd12258e51b3427e5b
Last active April 28, 2022 07:06
splash-screen.service
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi --noverbose -a /opt/splash.jpg
StandardInput=tty
StandardOutput=tty
#!/bin/bash
[[ $EUID -ne 0 ]] && echo "This script must be run as root." && exit 1
wget -P /tmp https://archive.raspberrypi.org/debian/pool/main/o/omxplayer/omxplayer_20190723+gitf543a0d-1+bullseye_armhf.deb
dpkg -i /tmp/omxplayer_20190723+gitf543a0d-1+bullseye_armhf.deb
apt install -y --fix-broken
cd /usr/lib/arm-linux-gnueabihf
ln -s libmmal_core.so.0 libmmal_core.so
@itapai
itapai / virt-install-windows.txt
Last active August 19, 2021 20:09
headless virt-install windows server
#!/usr/bin/env bash
qemu-img create -f qcow2 /var/lib/libvirt/vms/win-server-2019.iso 50G
virt-install \
--name=win-server-2019 \
--os-type=windows \
--memory=4096 \
--cpu=host \
--vcpus=2 \