Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Juan Calle juan-calle

🎯
Focusing
View GitHub Profile
@juan-calle
juan-calle / gist:9d53066249a6e11b0f7a3fc11c885d8d
Created Mar 28, 2021
Download MacOS Big Sur 11.2.3 disk image direct to Downloads folder
View gist:9d53066249a6e11b0f7a3fc11c885d8d
sudo curl -s https://raw.githubusercontent.com/grahampugh/macadmin-scripts/master/installinstallmacos.py | sudo python - --workdir ~/Downloads --version 11.2.3
@juan-calle
juan-calle / ccdl.command
Last active Apr 30, 2021 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.2 (macOS only)
View ccdl.command
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@juan-calle
juan-calle / bigONotation.js
Created May 1, 2021 — forked from jhwheeler/bigONotation.js
Big O Notation Exercises
View bigONotation.js
// 1. Even or odd
function isEven(value){
if (value % 2 == 0){
return true;
}
else
return false;
}
@juan-calle
juan-calle / environment-setup.md
Last active Jun 26, 2021
EsLint / Prettier - Setup
View environment-setup.md

ESLint, Prettier & Husky/lint-staged Pre-commits

Installation

This will install eslint and prettier plus the necessary config modifications to make both work with each other nicely:

  npm i -D eslint prettier eslint-config-prettier
View cloneObjectWithReduce.js
function cloneObject(object) {
return Object.entries(object).reduce((result, [key, value]) => {
result[key] = value
return result
}, {})
}
let myObject = { a: 1, b: 2 }
console.log(cloneObject(myObject))
// => { a: 1, b: 2 }
View Vscode Shortcuts.md

VSCode Shortcuts

General
⇧⌘P, F1 Show Command Palette
⌘P Quick Open, Go to File...
⇧⌘N New window/instance
⌘W Close window/instance
⌘, User Settings
⌘K ⌘S Keyboard Shortcuts