Skip to content

Instantly share code, notes, and snippets.

View Justinjdaniel's full-sized avatar
🏕️
Working from home

Justin J Daniel Justinjdaniel

🏕️
Working from home
View GitHub Profile
@Justinjdaniel
Justinjdaniel / console.min.js
Last active January 21, 2022 05:38
Custom Logger using ANSI escape code & Winston
/**
* @author Justin J Daniel
* @description Terminal console colorizer with time.
* @type Console log colorizer
* @license MIT
* @version 0.0.5
* @date 18 Dec 2021
* @update 03 Jan 2022
*/const t=new Date().toLocaleTimeString();const log=function(o,l){if(l!==undefined)l=l.toLowerCase();switch(l){case 'error':error(o);break;case 'warn':warn(o);break;case 'info':info(o);break;case 'success':success(o);break;default:console.log(`\x1b[7m\x1b[47m\x1b[30m\x1b[1m Log \x1b[0m\x1b[2m :\x1b[0m \x1b[1m[${t}]\x1b[0m
`,o);break}};function error(o){console.log(`\x1b[41m\x1b[1m ERROR \x1b[0m\x1b[2m :\x1b[0m \x1b[1m[${t}]\x1b[0m
@Justinjdaniel
Justinjdaniel / ohmyposhv3-v3.omp.json
Last active October 15, 2021 11:25 — forked from shanselman/ohmyposhv3-v2.json
Oh my Posh My theme
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "path",
"style": "diamond",
"powerline_symbol": "",
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons