Skip to content

Instantly share code, notes, and snippets.

@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;
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Extreme Programming Explained - Kent Beck.pdf' WHERE `id`='1';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='The Art of Application Performance Testing – Help for Programmers and Quality Assurance.pdf' WHERE `id`='11';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='effective-javascript.epub' WHERE `id`='76';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Practices of an Agile Developer. Working in the Real World.pdf' WHERE `id`='75';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='effective-javascript.pdf' WHERE `id`='77';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Джони Айв. Легендарный дизайнер Apple.fb2' WHERE `id`='78';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Web UI Design for the Human Eye – Colors, Space, Contrast.pdf' WHERE `id`='50';
UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Interaction Design - Best Practices – Mastering Time, Responsiveness, and Behav