Skip to content

Instantly share code, notes, and snippets.

View euaaron's full-sized avatar
🚀
#NeverStopLearning

Aaron Carneiro euaaron

🚀
#NeverStopLearning
View GitHub Profile
@euaaron
euaaron / Microsoft.Powershell_profile.ps1
Last active March 4, 2024 13:56
Windows CLI - Powershell script to download and switch between different Nodejs versions.
# --------------------------------------------
# Nodejs Version Manager Powershell (nmp)
# v1.0.2
# Author: Aaron Carneiro <@euaaron>
# Email: [email protected]
# GitHub: https://github.com/euaaron
# This File: https://gist.github.com/euaaron/8b0a2497244b3711e65ad798bdc5873f
# --------------------------------------------
$nmpVersion = "v1.0.2"
$silentInit = $false
@euaaron
euaaron / pre-push.sh
Last active June 5, 2022 04:38
GitHook - package.json version bump (main=major, feat=minor, other=patch)
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
commit_message=$(git log -1 --pretty=%B | cat)
branch=$(git rev-parse --abbrev-ref HEAD | cat)
version="patch"
if $(echo $branch | grep -q "main")
then
echo "Do not push to main branch, do a PR instead."
@diego3g
diego3g / settings.json
Last active December 13, 2025 18:56
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@gaearon
gaearon / modern_js.md
Last active December 2, 2025 08:14
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav