Skip to content

Instantly share code, notes, and snippets.

2018-09-04 10:02:39.824622 E [4009:47196840158540 _run.rb:43] tasks -- Thread: CameraAPI crashed failed to connect: No route to host - connect(2) for "192.168.8.103" port 80, restarting...
2018-09-04 10:04:00.202965 E [4009:47196840158540 _run.rb:43] tasks -- Thread: CameraAPI crashed failed to connect: No route to host - connect(2) for "192.168.8.103" port 80, restarting...
2018-09-04 10:05:22.438618 E [4009:47196840158540 _run.rb:43] tasks -- Thread: CameraAPI crashed failed to connect: No route to host - connect(2) for "192.168.8.103" port 80, restarting...
2018-09-04 10:39:04.648102 E [4009:47196840158540 _run.rb:43] tasks -- Thread: CameraAPI crashed failed to connect: No route to host - connect(2) for "192.168.8.103" port 80, restarting...
2018-09-04 11:30:00.462677 E [4009:47196840158540 _run.rb:43] tasks -- Thread: CameraAPI crashed failed to connect: No route to host - connect(2) for "192.168.8.103" port 80, restarting...
2018-09-04 11:32:27.439437 E [4009:47196840158540 _run.rb:43] tasks -- Thread:
✗ ./gradlew assembleRelease
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Configure project :app
google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used.
please apply google-services plugin at the bottom of the build file.
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
I'm using Mosquitt 1.4.8-1ubuntu0.16.04.3 both on client and server side
I have this configuration on the client side:
============================================
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
irb(main):001:0> `sudo top -bn2 | sed -n '/Cpu/p' | tail -n 1`.strip.split(/,\s/).map do |i|
irb(main):002:1* i.match(/([0-9]*(\.|\,)[0-9]*)/).captures[0].to_f
irb(main):003:1> end
=> [0.2, 1.8, 11.5, 86.4, 0.0, 0.0, 0.1, 0.0]
irb(main):004:0> `sudo top -bn2 | sed -n '/Cpu/p' | tail -n 1`.strip.split(/,\s*/).map do |i|
irb(main):005:1* i.match(/([0-9]*\.[0-9]*)/).captures[0].to_f
irb(main):006:1> end
=> [0.1, 1.8, 11.8, 85.6, 0.8, 0.0, 0.1, 0.0]
irb(main):007:0> `cat /etc/issue`
=> "Ubuntu 16.04 LTS \\n \\l\n\n"
require 'active_support/all'
def parse_stream(stream)
begin
boundary = stream.readline.strip # Boundary is the first thing in the stream
loop do
fail 'Nothing in stream' unless boundary.present?
header = {}
stream.each_line do |line|

Can you write a simple Ruby parse that will turn the following string:

	Events[0].Lane=1
	Events[0].Object.BoundingBox[0]=1248
	Events[0].Object.BoundingBox[1]=3528
	Events[0].Object.BoundingBox[2]=1920
	Events[0].Object.BoundingBox[3]=3848
	Events[0].Object.Center[0]=1584
	Events[0].Object.Country=GBR
	Events[0].SnapSourceCombine=false
Can you write a simple Ruby parse that will turn the following string:
~~ Events[0].Lane=1
~~ Events[0].Object.BoundingBox[0]=1248
~~ Events[0].Object.BoundingBox[1]=3528
~~ Events[0].Object.BoundingBox[2]=1920
~~ Events[0].Object.BoundingBox[3]=3848
~~ Events[0].Object.Center[0]=1584
~~ Events[0].Object.Country=GBR
~~ Events[0].SnapSourceCombine=false
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Janus Gateway configure 0.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-websockets --disable-data-channels --disable-rabbitmq --disable-mqtt
## --------- ##
## Platform. ##