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/python | |
| ''' | |
| A Simple mjpg stream http server for the Raspberry Pi Camera | |
| inspired by https://gist.github.com/n3wtron/4624820 | |
| ''' | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| import io | |
| import time | |
| import picamera |
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
| Fileserver: | |
| Samba (Windows PCs) | |
| NFS (Linux / pi ) | |
| Owncloud file sync (LAN / internet / mobile) | |
| Media: | |
| torrent box (transmission-daemon & chrome / firefox addons) | |
| plex server (to chromecasts / phones /tablets) | |
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 apt-get update && apt-get install samba rpi-update | |
| sudo apt-get install dnsmasq tcpbump nfs-kernel-server | |
| sudo mkdir -p /nfs/rpilite /tftpboot | |
| sudo BRANCH=next rpi-update |
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
| # /etc/dnsmasq.d/03-tftpboot.conf | |
| enable-tftp | |
| tftp-root=/tftpboot | |
| pxe-service=0,"Raspberry Pi Boot" |
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
| # /etc/dnsmasq.d/00-dhcpd.conf | |
| dhcp-range=192.168.0.30,192.168.0.245,255.255.255.0,72h | |
| dhcp-option=3,192.168.0.1 | |
| dhcp-option=option:dns-server,192.168.0.22,192.168.0.22 | |
| dhcp-authoritative |
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
| import gps | |
| from flask import Flask | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def location(): | |
| session = gps.gps("localhost", "2947") | |
| session.stream(gps.WATCH_ENABLE | gps.WATCH_NEWSTYLE) | |
| report = session.next() | |
| while report['class'] != 'TPV': |
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
| Raspbian Lite | |
| raspi-config | |
| enable camera | |
| add wifi to /etc/wpa_supplicant/wpa_supplicant.conf | |
| apt-get install samba | |
| edit /etc/samba/smb.conf | |
| [home] | |
| path = /home/pi | |
| read only = no |
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
| now=$(date +"%Y%m%d-%H%M") # 20160618-1143 | |
| raspivid -w 640 -h 640 -t 0 -sg 30000 -o $now-%d.mpg |
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
| @echo off | |
| rem usage: wifiorder mySSID 1 | |
| netsh wlan show profiles | |
| netsh wlan show profiles|find "Profiles on interface">c:\temp\temp.$$$ | |
| for /f "tokens=1 delims=," %%f in (c:\temp\temp.$$$) do set Interface=%%f | |
| set Interface=%Interface:~22,-1% | |
| echo %Interface% | |
| netsh wlan set profileorder name="%1" Interface="%Interface%" priority=%2 | |
| netsh wlan show profiles |
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
| auto lo | |
| iface lo inet loopback | |
| allow-hotplug eth0 | |
| iface eth0 inet dhcp | |
| allow-hotplug wlan0 | |
| iface wlan0 inet manual | |
| wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | |
| iface default inet dhcp |