Skip to content

Instantly share code, notes, and snippets.

View JuanFelix88's full-sized avatar
🏠
Working from home

Juan Felix JuanFelix88

🏠
Working from home
View GitHub Profile
function getRandom (items) {
return items[Math.floor(Math.random()*items.length)]
}
const fruits = ['uva', 'laranja', 'batata']
getRandom(fruits)
@diego3g
diego3g / NODE.md
Last active May 17, 2025 15:09
VSCode Settings (Updated)

⚠️ Note!

With VSCode version 1.94, the APC extension broke and there is no fix yet.

So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:

"update.mode": "manual",
@gaearon
gaearon / minification.md
Last active January 28, 2025 19:19
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal: