Skip to content

Instantly share code, notes, and snippets.

View valera-rozuvan's full-sized avatar
💻
coding

Valera Rozuvan valera-rozuvan

💻
coding
View GitHub Profile
@nathan-osman
nathan-osman / win32.go
Last active July 18, 2024 16:55
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@branneman
branneman / better-nodejs-require-paths.md
Last active July 30, 2024 01:03
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions