Skip to content

Instantly share code, notes, and snippets.

View Davydx7's full-sized avatar
🎯
Focusing

David Olufemi Davydx7

🎯
Focusing
View GitHub Profile
@Davydx7
Davydx7 / Node version switch automation for windows.md
Last active June 20, 2024 11:28
Automated Node Version Switching for Windows using NVM

Automated Node Version Switching for Windows using NVM

Introduction

Managing multiple versions of Node.js can be cumbersome, especially when working on different projects that require different versions. On Unix-based systems, nvm (Node Version Manager) allows users to switch between different versions of Node.js seamlessly. However, on Windows, nvm behaves differently and does not automatically switch versions based on the .nvmrc file. This script automates the process of switching Node.js versions on Windows using nvm-windows.

Script

# Load nvm and automatically use the Node version specified in .nvmrc
load-nvmrc() {
@incredimike
incredimike / variousCountryListFormats.js
Last active July 5, 2024 05:47
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//