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
Install gstreamer + plugins on one system: | |
gst-launch-1.0 -v mpegtsmux name=mux alignment=1 ! udpsink host=238.0.0.1 port=1234 videotestsrc ! video/x-raw,width=1280,height=720,format=I420 ! x264enc speed-preset=ultrafast bitrate=3000 key-int-max=60 ! video/x-h264,profile=high ! mux. | |
Download and install mediamtx to "receive" the stream sent from gstreamer. | |
https://github.com/bluenviron/mediamtx | |
mediamtx will be used to re-broadcast the stream over webrtc. This can be done on as many systems as seems reasonable for demonstrating multicast. | |
mediamtx.yml config file (note, this file needs to be edited to have the right IPs): | |
-------------------------------------------------- |
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
On the server side (read: Robot): | |
gst-launch-1.0 --no-fault v4l2src device=/dev/video0 ! "image/jpeg,width=480,height=240,framerate=30/1" ! jpegparse ! jpegdec ! videoscale ! video/x-raw,width=160,height=120 ! jpegenc ! rtpjpegpay mtu=512 ! udpsink host=127.0.0.1 port=5804 | |
On the receiver side (read: Driver Station): | |
gst-launch-1.0 -e -v udpsrc port=5804 ! application/x-rtp, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink |
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
//Generate a project codename as a vRO (vRealize Orchestrator) action | |
//return type is string | |
//no inputs | |
//Shamelessly borrowed from https://github.com/zachwlewis/projectcodename | |
//GPL 2.0 licensed | |
var attributes = [ | |
// Environ | |
"desert", "tundra", "mountain", "space", "field", "urban", | |
// Stealth and cunning |
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
#put the following line into /etc/udev/rules.d | |
ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a30e", RUN+="/sbin/modprobe gs_usb" RUN+="/bin/sh -c 'echo 0483 a30e ff > /sys/bus/usb/drivers/gs_usb/new_id'" |
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
Plug your USB device into the RoboRIO's USB Port like so: | |
http://i.imgur.com/LKv2js1l.jpg | |
Run the command "dmesg" and find out where the device is assigned (Example: /dev/sda). | |
You may need to setup a swap filesystem on the device. If you do then use fdisk (Example: "fdisk /dev/sda") to clear the existing partition table on the device and assign a clean partition of type Linux Swap (82) to the device's new partitions. In our case, after deleting the existing partition table and then creating a new partition (/dev/sda1). | |
You can then use mkswap on the device: "mkswap /dev/sda1". This sets up a swap area on the device. | |
You can then use swapon to enable the OS that the swap space is available to use (Example: "swapon /dev/sda1"). |
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 ( | |
"fmt" | |
"log" | |
"net/http" | |
"bytes" | |
"io/ioutil" | |
"crypto/tls" | |
) |
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
/* | |
Basic FizzBuzz written in Go. Just felt like writing it. | |
*/ | |
package main | |
import "fmt" | |
func main() { | |
for i := 1; i <= 100; i++ { |
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
sudo apt-get install -y supervisor | |
sudo mkdir /usr/share/elasticsearch | |
cd /usr/share/elasticsearch | |
sudo wget https://download.elasticsearch.org/kibana/kibana/kibana-4.0.1-linux-x64.tar.gz | |
sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz | |
sudo wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz | |
sudo tar -zxvf elasticsearch-0.90.0.tar.gz |