Skip to content

Instantly share code, notes, and snippets.

View bengchet's full-sized avatar

Ng Beng Chet bengchet

View GitHub Profile
@bengchet
bengchet / find_cam.py
Created November 6, 2019 23:08 — forked from kphretiq/find_cam.py
Identify Camera Device Linux
"""
#Installing v4l-utils (debian) gives one the handy v4l2-ctl command:
$ v4l2-ctl --list-devices
HPigh Definition Webcam (usb-0000:00:14.0-11):
/dev/video2
UVC Camera (046d:0821) (usb-0000:00:14.0-13):
/dev/video0
@bengchet
bengchet / winstonLogger.js
Created December 29, 2017 03:18 — forked from nigilan/winstonLogger.js
Winston logger and daily rotator
/**
* Configurations of logger.
*/
const winston = require('winston');
process.env.NODE_ENV = "production";
const env = process.env.NODE_ENV;
const fs = require('fs');
var util = require('util');
const logDir = 'applicationlog';