Skip to content

Instantly share code, notes, and snippets.

#include <WiFi.h>
#include <WiFiAP.h>
#include <DNSServer.h>
#include <ESPAsyncWebServer.h>
#include <ArduinoJson.h>
#include <AsyncJson.h>
#define index_html "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"><meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"><title>Document</title></head><body><div style=\"display: flex; justify-content: space-between; padding-top: 100px;\"><div style=\"display: flex; width: 200px;transform: rotate(-90deg);\"><input type=\"range\" min=\"-1\" max=\"1\" step=\"0.1\" value=\"0\" id=\"throttle\"></div><div style=\"display: flex; width: 200px;\"><input type=\"range\" min=\"-1\" max=\"1\" step=\"1\" value=\"0\" id=\"steering-wheel\"></div></div><script>const throttleEl = document.getElementById('throttle');const steeringWheelEl = document.getElementById('steering-wheel');function sendState() {console.log(throttleEl.value, steeringW
@FreeFly19
FreeFly19 / start.sh
Created July 3, 2020 14:41
Zeppelin Docker Swarm
docker service create --name zeppelin-2 --hostname zeppelin-2 --publish published=8081,target=8080 --host zeppelin-2:127.0.0.1 --constraint node.hostname==melnyk-ubuntu --mount type=bind,source=/home/freefly19/notebook,destination=/notebook -e ZEPPELIN_NOTEBOOK_DIR=/notebook apache/zeppelin:0.9.0
@FreeFly19
FreeFly19 / 1.sh
Last active February 5, 2020 11:11
Command for gstreamer rtsp to mp4 file
gst-launch-1.0 -e rtspsrc location='rtsp://localhost:554/stream' latency=300 ! queue ! rtph264depay ! h264parse ! mp4mux ! filesink location=file3.mp4
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYq9kCyMVu5psVgjyuAX0KywJ8ogvzcQRhW1GjiSZP0GP7zMJf4tfBcCBwHekvgEkyvI9uIJRKO6ioeCTssoaS/jTR6Jl15OtpG5yfCllsGtCNBFNTIItwEaDCMbuZCVFKx5khqTZop+2spv3g3Lzydk6SIkZaqFxCVB7k1irbqF7y3XJREv+NWbz0BbvYGbdMSSyztACsTJWAqg3UYIda1xpDovf8FbDyOdcRT/ngzz+YUskRtY/NvCYa6JO7Z0WHhHVkmCiJj/BLILbyUtoQiXxFQklgDMrVR4YxxvtglVHcuftYH7EUiOwiV3/gx+T/jMU6j9jNhqXQDjsREee0dT/4pukTTRjLLv9WcFmTJXHrTQYT/CGIs3Cr8U8yV7rLLhj7EXf0OO4QeDqJIoMzAB8w9oSoXPGk8jpDGTu1DOZQYyXnjq5Ga5baDHmOOwvUCk8HFtVTBdwGzspFAFR7EXhCz8PouaGgsIVj49h09QGBo4lTsvNH+nUyUh+8+f8= Oleksandr Melnyk@DESKTOP-IV7QD8N
"""
Usage:
# From tensorflow/models/
# Create train data:
python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=train.record
# Create test data:
python generate_tfrecord.py --csv_input=data/test_labels.csv --output_path=test.record
"""
from __future__ import division
from __future__ import print_function
@FreeFly19
FreeFly19 / gist:cb7e92da45fa50226961f4df3c05eb44
Created April 16, 2019 09:10
MySQL Shell Docker example
docker run --name=mysql8 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test -d mysql/mysql-server:8
docker exec -it mysql8 mysqlsh root@localhost/test -S/var/lib/mysql/mysql.sock
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
-- to apply use: cat add-expirience-points.sql | docker exec -i vp-pg-master psql -Upostgres vp
COPY public.experience_point (id, deleted, filterable, description, name) FROM stdin;
53 f t Geekhub courses GeekHub
54 f t SPD-University courses SPD-University
55 f t Previous Job Previous Job
57 f t Information about other courses Other Courses
58 f t Certificates Certification
59 f t Education Education
61 f t \N Foreign languages
\.
d3.event.preventDefault();
let nodeGroup = g.select('#' + d3.event.toElement.parentNode.id);
const r = 30;
const k = Math.PI * 2 / (100 / r);
const arcPercentLength = percent => (k * percent + ' ' + (k * 100 - percent));
const rotate = times => -times * r * Math.PI * 2;
@FreeFly19
FreeFly19 / default
Last active March 31, 2018 23:16 — forked from Nata01/default
nginx config for backend API and frontend SPA
# File path: /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/ubuntu/ProjectBravo/smartschool/dist;
location /api {
proxy_redirect off;
proxy_pass http://localhost:8080;