Skip to content

Instantly share code, notes, and snippets.

View bengsiswantoh's full-sized avatar

Bengsiswanto Hendrawan bengsiswantoh

View GitHub Profile
@bengsiswantoh
bengsiswantoh / list-all-files.js
Last active April 2, 2026 18:18
List all file JS
const fs = require("fs")
const path = require("path")
const getAllFiles = function(dirPath, arrayOfFiles) {
files = fs.readdirSync(dirPath)
arrayOfFiles = arrayOfFiles || []
files.forEach(function(file) {
if (fs.statSync(dirPath + "/" + file).isDirectory()) {
@bengsiswantoh
bengsiswantoh / aws-upload-directory
Last active October 22, 2020 06:52
upload directory to aws
https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
aws s3 cp {local_dir} s3://{remote_dir} --recursive