Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get:
Install Golang 1.9:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
If already installed old golang with apt-get:
| //Embed ... | |
| type Embed struct { | |
| *discordgo.MessageEmbed | |
| } | |
| // Constants for message embed character limits | |
| const ( | |
| EmbedLimitTitle = 256 | |
| EmbedLimitDescription = 2048 | |
| EmbedLimitFieldValue = 1024 |
| # npm using https for git | |
| git config --global url."https://github.com/".insteadOf git@github.com: | |
| git config --global url."https://".insteadOf git:// | |
| # npm using git for https | |
| git config --global url."git@github.com:".insteadOf https://github.com/ | |
| git config --global url."git://".insteadOf https:// |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "net" | |
| "os" | |
| "strings" |
| #!/bin/bash | |
| ## file to upload. | |
| S3_UPLOAD_FILE=some/path/file.txt | |
| ## Specify the bucket name here. This can be found in the S3 console | |
| S3_BUCKET=bucket name here | |
| ## The desired path relative to the root of the bucket. All folders must be forward slash '/' separated | |
| S3_DESTINATION_FILE=folder/folder2/file.txt |
| #!/bin/sh | |
| # setup ~/.pgpass to allow passwordless connection to postgres | |
| # keep last 30 executions for each job | |
| KEEP=30 | |
| cd /var/lib/rundeck/logs/rundeck | |
| JOBS=`find . -maxdepth 3 -path "*/job/*" -type d` |
| Vagrant.configure(2) do |config| | |
| config.vm.box = 'ubuntu/trusty64' | |
| config.vm.provider 'virtualbox' do |v| | |
| v.memory = 4096 | |
| v.cpus = 8 | |
| end | |
| config.vm.network 'private_network', ip: '192.168.33.10' | |
| config.vm.hostname = 'build.vagrant.stellar-ops.com' |