Skip to content

Instantly share code, notes, and snippets.

View msdigital's full-sized avatar
🏠
Working from home

Martin msdigital

🏠
Working from home
  • msdigital
  • Schweiz
View GitHub Profile
@msdigital
msdigital / .autonvm
Created October 3, 2022 10:23
bash automatic nvm node version switcher
##################################################
# Prerequisites
# This script only works with nvm
# Please install nvm first https://github.com/nvm-sh/nvm
#-------------------------------------------------
# Installation
# Copy this script into your home folder
# add "source ~/.autonvm" top the bottom of your .bashrc or .bash_profile
#-------------------------------------------------
# Usage
@msdigital
msdigital / logger.js
Created November 24, 2021 14:53
Simple NodeJS Winston Logger with different Log Levels
const winston = require('winston')
const logLevels = {
levels: {
emerg: 0,
alert: 1,
crit: 2,
error: 3,
warning: 4,
notice: 5,
info: 6,