Skip to content

Instantly share code, notes, and snippets.

View Ibadichan's full-sized avatar
:octocat:
Working from home

Ivan Badichan Ibadichan

:octocat:
Working from home
  • Butuceni, Moldova
View GitHub Profile
@Ibadichan
Ibadichan / VanDragger.js
Last active March 12, 2021 09:57
The implementation of drag and drop.
class VanDragger {
constructor() {
this.draggableObject = {};
document.addEventListener('mousedown', this._mouseDown.bind(this));
document.addEventListener('mousemove', this._mouseMove.bind(this));
document.addEventListener('mouseup', this._mouseUp.bind(this));
}
onDragStart(draggableObject) {}
onDragEnd(draggableObject, droppableElement) {}
@Ibadichan
Ibadichan / MeetingConnection.js
Last active March 12, 2021 09:58
The implementation of WebRTC connection.
import socket from 'shared/sockets/OASocket';
/**
* Class representing a MeetingConnection.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Perfect_negotiation}
* to understand "The WebRTC perfect negotiation pattern".
*/
class MeetingConnection {
/**
@Ibadichan
Ibadichan / question-answer
Last active September 24, 2017 17:19
This is basic file for Monit
### Nginx ###
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 127.0.0.1 port 80 protocol http
then restart
if 3 restarts within 5 cycles then timeout