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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add the subtle gradient to the editor background */ | |
.monaco-editor { | |
background-color: black !important; | |
background-image: linear-gradient(to bottom, #2a2139 75%, #34294f); | |
background-size: auto 100vh; | |
background-position: top; | |
background-repeat: no-repeat; | |
} | |
.monaco-workbench { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Even or odd | |
function isEven(value){ | |
if (value % 2 == 0){ | |
return true; | |
} | |
else | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo curl -s https://raw.githubusercontent.com/grahampugh/macadmin-scripts/master/installinstallmacos.py | sudo python - --workdir ~/Downloads --version 11.2.3 |