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 / settings.json
Last active June 30, 2026 03:09
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 / minification.md
Last active April 4, 2026 09:30
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: