Skip to content

Instantly share code, notes, and snippets.

@SellJamHere
SellJamHere / install_golang.sh
Last active June 17, 2016 20:36
Install golang on a raspberry pi
#!/bin/bash
# Inspired by http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi
function cleanGo {
rm -rf $HOME/go-linux-arm-bootstrap
}
#cleanGo
# Download go 1.4 binary
@SellJamHere
SellJamHere / interfaces.tmp
Last active January 18, 2016 06:15
/etc/network/interfaces file
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
@SellJamHere
SellJamHere / wpa_supplicant.conf.tmp
Last active January 18, 2016 06:15
Base wpa_supplicant file.
network={
ssid="network_name"
psk="network_password"
}
@SellJamHere
SellJamHere / setup_network.sh
Last active January 18, 2016 07:22
Raspberry Pi network setup
### Start getopts code ###
#Parse command line flags
#If an option should be followed by an argument, it should be followed by a ":".
#Notice there is no ":" after "h". The leading ":" suppresses error messages from
#getopts.
while getopts :s:p:r FLAG; do
case $FLAG in
s) #set option "s"
@SellJamHere
SellJamHere / enable_camera.sh
Last active January 18, 2016 07:40
Enables the raspberry pi camera
#!/bin/sh
# Part of raspi-config http://github.com/asb/raspi-config
#
# See LICENSE file for copyright and license details
while getopts :r FLAG; do
case $FLAG in
r) #set option "r"
should_reboot=true
;;
@SellJamHere
SellJamHere / setup.sh
Last active February 4, 2016 08:38
Raspberry Pi setup
function cleanSetup {
echo "cleaning up"
if [ "$1" = true ] ; then
sudo rm -f $HOME/setup.sh
fi
sudo rm -f $HOME/install_golang.sh
sudo rm -f $HOME/install_python.sh
sudo rm -f $HOME/install_opencv.sh
sudo rm -f $HOME/setup_network.sh
@SellJamHere
SellJamHere / install_opencv.sh
Last active January 15, 2016 08:50
Raspberry Pi install OpenCV 3
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libgtk2.0-dev -y
sudo apt-get install libatlas-base-dev gfortran -y
cd ~/workspace
mkdir opencv
cd opencv
git clone https://github.com/Itseez/opencv.git
git clone https://github.com/Itseez/opencv_contrib.git
@SellJamHere
SellJamHere / install_python.sh
Last active December 17, 2015 08:44
Raspberry Pi install python
sudo apt-get install python3-dev -y
pip3 install numpy
@SellJamHere
SellJamHere / update.sh
Last active December 15, 2015 07:33
Raspberry Pi initial setup
sudo apt-get update -y
sudo apt-get upgrade -y
sudo rpi-update -y
sudo apt-get install build-essential git cmake pkg-config -y