Skip to content

Instantly share code, notes, and snippets.

View teuteuguy's full-sized avatar

Timothee Cruse teuteuguy

View GitHub Profile
@teuteuguy
teuteuguy / install.sh
Last active March 7, 2019 10:06
RaspberryPi Greengrass Bootstrap
#!/bin/bash
# Run this on your Pi by running the following command line:
# curl https://gist.githubusercontent.com/teuteuguy/89ef4128d92f95372fe6c8c0c207f3c3/raw | sudo bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
@teuteuguy
teuteuguy / greengrassd.service
Last active May 30, 2020 07:53
greengrassd.service
[Unit]
Description=Start Greengrass at Boot
[Service]
Type=forking
PIDFile=/var/run/greengrassd.pid
Restart=on-failure
ExecStart=/greengrass/ggc/core/greengrassd start
ExecReload=/greengrass/ggc/core/greengrassd restart
ExecStop=/greengrass/ggc/core/greengrassd stop
#!/bin/bash
set -e
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "You must sudo this script"
exit
fi
CMAKE_VERSION="3.18.0"
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "You must sudo this script"
exit
fi
apt-get update
apt-get upgrade -y
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "You must sudo this script"
exit
fi
apt-get update
apt-get upgrade -y
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "You must sudo this script"
exit
fi
apt-get update
apt-get upgrade -y
sudo apt-get purge -y libreoffice*
sudo apt-get clean
sudo add-apt-repository ppa:ubilinux/up
sudo apt update
sudo apt-get autoremove --purge 'linux-.*generic'
sudo apt-get install -y linux-image-generic-hwe-18.04-upboard
sudo apt dist-upgrade -y
sudo reboot
#!/bin/bash
sudo apt-get purge -y wolfram-engine
sudo apt-get purge -y libreoffice*
sudo apt-get clean
sudo apt-get autoremove -y
sudo nano /etc/default/grub
# Edit grub. Add pci=noaer at the end of GRUB_CMDLINE_LINUX_DEFAULT. Line will be like this:
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"
sudo update-grub
sudo reboot
Get everything
v4l2-ctl --device /dev/video0 --all
List all the controls webcam has.
v4l2-ctl -d 0 -l
List all the resolutions
v4l2-ctl --list-formats-ext
List all the formats