Skip to content

Instantly share code, notes, and snippets.

View ginixsan's full-sized avatar

Ginés Sanz Sanchis ginixsan

View GitHub Profile
@ginixsan
ginixsan / nodejs-cicd-github-actions.md
Created January 13, 2022 13:15 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to vps folder

git clone https://github.com/danielwetan/node1.git
@ginixsan
ginixsan / index.html
Created May 10, 2021 07:56
Webview Tag Examples
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@ginixsan
ginixsan / pedestrian-tracker.js
Created April 20, 2021 08:54 — forked from MForMarlon/pedestrian-tracker.js
Pedestrian tracker using HOG Descriptor and opencv4nodejs
// based from https://github.com/justadudewhohacks/opencv4nodejs/tree/master/examples/simpleTracking1.js
// This code is meant to be run on a Raspberry Pi 3 with the picamera.
// NOTE: Before running this code, for OpenCV to detect the camera, you need to run sudo modprobe bcm2835-v4l2
// TODO: Write each detected frame to an image file somewhere, with the timestamp in the name
const cv = require('opencv4nodejs');
const delay = 50;
const hog = new cv.HOGDescriptor();
hog.setSVMDetector(cv.HOGDescriptor.getDefaultPeopleDetector());
@ginixsan
ginixsan / client.js
Created October 4, 2020 09:53 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});