- Why did the Vue child component have such great self-esteem? Because its parent kept giving it props!
- What does a Vue developer have in his tea? Syntactic sugar
- Programming is like sex: One mistake and you have to support it for the rest of your life.
- Sometimes when I'm writing JavaScript I want to throw up my hands and say "this is bullshit!" but I can never remember what "this" refers to.
- Why are JavaScript conferences the worst? It all just sounds scripted.
- How do you comfort a JavaScript bug? a. You console it.
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
// A dependency-free, await-ready function for Node.js | |
// to get user input in the console | |
// Author: Marc Backes (@themarcba | |
const getInput = query => { | |
return new Promise((resolve, reject) => { | |
const readline = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}) | |
readline.question(`${query} `, answer => { |
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
#!/usr/bin/env zsh | |
source ~/.zshrc | |
ggpull | |
gco -b "bugfix/$1" |
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
npm init vue@3 | |
if [ $? -eq 0 ]; then | |
LAST_FOLDER=$(ls -td ./* | head -1) | |
cd $LAST_FOLDER | |
yarn | |
code . | |
else | |
echo "Project creation unsuccessful 😔" | |
fi |
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
const acceptInterval = setInterval(() => { | |
const acceptButtons = Array.from(document.querySelectorAll("[role=button]")).filter( | |
(button) => button.textContent === "Approve" | |
); | |
if (acceptButtons.length > 0) { | |
acceptButtons.forEach((b) => b.click()); | |
window.scrollBy(0, window.innerHeight - 100); | |
} else { | |
clearInterval(acceptInterval); |
OlderNewer