Skip to content

Instantly share code, notes, and snippets.

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

Praym premkash

🏠
Working from home
  • London
View GitHub Profile
@premkash
premkash / node-dir-files-info.js
Created July 13, 2020 14:13
Displays the info about files in a directory at a given path
const fsp = require("fs/promises");
async function dirFilesInfo(path) {
const dir = await fsp.opendir(path);
for await (const dirEntry of dir) {
const fileInfo = await fsp.stat("./" + dirEntry.name);
console.log(dirEntry.name, fileInfo);
}
}
dirFilesInfo("./").catch(console.error);
@premkash
premkash / git-commit.template
Created July 4, 2018 12:36
Template for git commit messages
# If this commit is applied, it will ...?
# Syntax:
# Commit Type: Subject (Max 50 chars)
#-----------------------------------------------|
# (optional body) (Max 72 chars)
# Explain the problem this commit is solving. Focus on why you are
# making this change as opposed to how (the code explains that).
#----------------------------------------------------------------------|
@premkash
premkash / .gitconfig
Created August 22, 2016 17:17 — forked from ronaldsuwandi/.gitconfig
My personal gitconfig
[user]
name = Ronald Suwandi
email = [email protected]
[core]
excludesfile = /Users/ronald/.gitignore_global
# editor = subl -nw
editor = vim
[diff]