- Download the latest stable version from golang.org with
wget -c <url>
– usearmv6
architecture for Rasbperry Pi 3 Model B. - Extract with
sudo tar -C /usr/local -xvzf <file>
- Setup the Go workspace
-
^s
Incremental search -
^w
Select in scope -
cmd t
Open documents
- Check if there is an existing ssh key available
$ ls ~/.ssh
If id_rsa
(private key) and id_rsa.pub
(public key) are available, go to step 3.
- Generate new keys
Official Documentation: http://smarden.org/runit/ Quickstart: https://kchard.github.io/runit-quickstart/
sudo apt-get install runit
Launch runit on startup by running /usr/sbin/runsvdir-start &
in /etc/rc.local
. Read more
This file contains 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
// Steps to get this running | |
// 1. Install Go: http://golang.org/doc/install | |
// 2. Setup Go workspace: http://golang.org/doc/code.html#Organization | |
// 3. Download dependencies in Terminal.app | |
// 3.1 Navigate to multiswitchtest.go | |
// 3.2 Execute `go get` | |
// 4. Run `go run multiswitchtest.go` | |
package main | |
import ( |
This file contains 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
package main | |
import ( | |
"github.com/brutella/hc" | |
"github.com/brutella/hc/accessory" | |
"github.com/brutella/hc/log" | |
"net/http" | |
) | |
func main() { |
Most of the time I use a headless Raspberry Pi which I want to access via ssh. These are the steps to do that.
- Find the disk number of the SD card with
diskutil list
- Unmount the disk with
diskutil unmountDisk /dev/disk<number>
- Copy data on the SD card with
sudo dd bs=1m if=<img-file> of=/dev/rdisk<number> conv=sync
This file contains 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
# from http://stackoverflow.com/questions/11004137/re-sampling-h264-video-to-reduce-frame-rate-while-maintaining-high-image-quality | |
ffmpeg -y -i source.mov -r 30 -s 750x1334 -c:v libx264 -b:v 3M -strict -2 -movflags faststart destination.mov |
NewerOlder