Skip to content

Instantly share code, notes, and snippets.

@fandyaditya
fandyaditya / formatter.js
Created August 4, 2023 13:11
Node.js Script to Convert Notion Markdown Metadata into Hugo
const fs = require('fs');
const path = require('path');
const folderPath = 'path_to_folder'; // Replace with the path to your folder containing markdown files
fs.readdir(folderPath, (err, files) => {
if (err) {
console.error('Error reading directory:', err);
return;
}
package main
import (
"fmt"
"sync"
)
func increment(counter *int, wg *sync.WaitGroup) {
defer wg.Done()
*counter++
@fandyaditya
fandyaditya / file.go
Created July 10, 2026 06:19
go snippet 2
type User struct {
ID int
Email string
Name string
}
type UserRepository struct {
db *sql.DB
}