(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/env bash | |
| #Author nmrony<[email protected]> | |
| #you need to download it and give execution permission to run it | |
| #handle errors | |
| function die(){ | |
| echo $1; | |
| exit 1; | |
| } |
| { | |
| "env": { | |
| "browser": true, | |
| "node": true, | |
| "es6": true | |
| }, | |
| "plugins": ["react"], | |
| "ecmaFeatures": { |
| #Go to http://10.5.5.9:8080/gp/gpControl/execute?p1=gpStream&c1=restart before running this script | |
| import socket | |
| import sys | |
| from time import sleep | |
| def get_command_msg(id): | |
| return "_GPHD_:%u:%u:%d:%1lf\n" % (0, 0, 2, 0) | |
| UDP_IP = "10.5.5.9" | |
| UDP_PORT = 8554 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
| # Description: nginx init.d dash script for Ubuntu or other *nix. | |
| ### END INIT INFO |
| # remove php5 modules | |
| sudo apt-get autoremove --purge php5-* && \ | |
| sudo apt-get install -y language-pack-en-base && \ | |
| sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y && sudo apt-get update && \ | |
| sudo apt-get install -y php7.2 \ | |
| php7.2-cgi \ | |
| php7.2-cli \ | |
| php7.2-curl \ | |
| php7.2-imap \ | |
| php7.2-ldap \ |
| #Install pip and other dependencies | |
| sudo apt-get install python-dev python-pip libxslt-dev libxml2-dev | |
| sudo pip install buster | |
| nurrony@devmachine:vagrant-playbox$ vagrant up | |
| #Let it finish the initial tasks to boot up your vagrant box | |
| nurrony@devmachine:vagrant-playbox$ vagrant ssh | |
| vagrant@vagrant-playbox:~$ sudo yum -y update | |
| vagrant@vagrant-playbox:~$ cd /opt | |
| vagrant@vagrant-playbox:~$ sudo wget -c http://download.virtualbox.org/virtualbox/5.0.12/VBoxGuestAdditions_5.0.12.iso -O VBoxGuestAdditions_5.0.12.iso | |
| vagrant@vagrant-playbox:~$ sudo mount VBoxGuestAdditions_5.0.12.iso -o loop /mnt | |
| vagrant@vagrant-playbox:~$ cd /mnt | |
| vagrant@vagrant-playbox:~$ sudo sh VBoxLinuxAdditions.run --nox11 | |
| vagrant@vagrant-playbox:~$ cd /opt |
| /////////////////// REACT PART | |
| 'use strict'; | |
| var Counter = function Counter(_ref) { | |
| var value = _ref.value; | |
| var onIncrement = _ref.onIncrement; | |
| var onDecrement = _ref.onDecrement; | |
| return React.createElement( | |
| 'div', |