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
#!/bin/bash | |
mkdir $HOME/ts3 | |
cd $HOME/ts3 | |
wget http://dl.4players.de/ts/releases/3.0.13.3/teamspeak3-server_linux_amd64-3.0.13.3.tar.bz2 | |
tar -xvf teamspeak3-server_linux_amd64-3.0.13.3.tar.bz2 | |
cd teamspeak3-server_linux_amd64-3.0.13.3.tar.bz2 | |
bash ts3server_startscript.sh |
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
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.1.0 | |
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc | |
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc | |
source $HOME/.asdf/asdf.sh | |
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git | |
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git | |
asdf install erlang 19.0 | |
asdf install elixir 1.3.1 | |
asdf global erlang 19.0 | |
asdf global elixir 1.3.1 |
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
// This is usefull for checking unused reducer functions. | |
const uselessReducerDetector = storeObj => next => action => { | |
let result = next(action); | |
let state1 = storeObj.getState(); | |
let state2 = reducers(state1, result); | |
let isEqual = JSON.stringify(state1) === JSON.stringify(state2); | |
if (isEqual && action.type[0] !== "@") { | |
console.warn(`${action.type} didn't change state. May or may not be useless.`); | |
} else { | |
return result; |
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
Farmbot.prototype._onmessage = function (_, buffer /*, message*/) { | |
var msg = JSON.parse(buffer.toString()); | |
if(msg && (msg.method && msg.params && (msg.id === null))) { | |
console.log("Notification"); | |
this.emit("notification", msg); | |
return; | |
} | |
if(msg && (msg.id)){ | |
this.emit(msg.id, msg); | |
return; |
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
{ | |
"id":1, | |
"device_id":1, | |
"name":"Sequencer test", | |
"kind":"sequence", | |
"color":"purple", | |
"args":{ | |
}, | |
"body":[ |
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 -i | |
apt-get install avrdude | |
mkdir /tmp/farmbot-firmware | |
cd /tmp/farmbot-firmware | |
wget https://github.com/FarmBot/farmbot-arduino-firmware/releases/download/v0.0.1/firmware.hex -O firmware.hex | |
HEX_FILE=$(pwd)/firmware.hex | |
if [ -a /dev/ttyACM0 ] | |
then | |
TTY=/dev/ttyACM0 | |
elif [ -a /dev/ttyUSB0 ] |
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
{ | |
"pins": { | |
"9": { | |
"value": 1, | |
"mode": 0 | |
}, | |
"10": { | |
"value": 1, | |
"mode": 0 | |
}, |
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
# When pin is 10-99 and value is 0-9 | |
def parse_code(<<"R21 P", param :: size(16)," V", value :: size(8), " Q", tag :: binary>>) | |
do { :report_parameter_value, param, value, tag } end | |
# When param is 10-99 and up and value is 10-99 | |
def parse_code(<<"R21 P", param :: size(16)," V", value :: size(16), " Q", tag :: binary>>) | |
do { :report_parameter_value, param, value, tag } end | |
# When param is 10-99 and up and value is 100-999 | |
def parse_code(<<"R21 P", param :: size(16)," V", value :: size(24), " Q", tag :: binary>>) | |
do { :report_parameter_value, param, value, tag } end | |
# When param is 10-99 and up and value is 1000-9999 |
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
Erlang/OTP 19 [erts-8.0] [source] [smp:4:4] [async-threads:10] [kernel-poll:false] | |
00:00:05.571 [debug] Elixir.Nerves.Networking Starting | |
00:00[ 5.700939] random: nonblocking pool is initialized | |
:05.604 [debug] initializing Networking.Subsystem | |
00:00:06.083 [debug] Starting Network |
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
"ticker_error", | |
"ticker", | |
"toast_success", | |
"toast_error", | |
"toast_warning" |
OlderNewer