Skip to content

Instantly share code, notes, and snippets.

View giantshark's full-sized avatar
🚀
Working from home

pawan.h giantshark

🚀
Working from home
  • Thailand, Bangkok
View GitHub Profile
@giantshark
giantshark / HighResolutionTimer.js
Created May 14, 2020 18:33 — forked from tanepiper/HighResolutionTimer.js
A high resolution timer, set the tick duration (default 1s) and callback to be actioned on each tick - accurate to within ~1-5ms per tick and compensates automatically for drift over time.
var HighResolutionTimer = window.HighResolutionTimer = window.HighResolutionTimer || (function() {
var HighResolutionTimer = function(options) {
this.timer = false;
this.total_ticks = 0;
this.start_time = undefined;
this.current_time = undefined;
@giantshark
giantshark / nginx-socketio-ssl-reverse-proxy.conf
Created May 13, 2020 22:22 — forked from gmanau/nginx-socketio-ssl-reverse-proxy.conf
How to setup nginx as nodejs/socket.io reverse proxy over SSL
upstream upstream-apache2 {
server 127.0.0.1:8080;
}
upstream upstream-nodejs {
server 127.0.0.1:3000;
}
server {
listen 80;