In this article:
This file contains hidden or 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
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", | |
question: "question", | |
thought: "thought", | |
chore: "chore", |
feat: new feature
fix(scope): bug in scope
feat!: breaking change
/feat(scope)!: rework API
chore(deps): update dependencies
build
: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci
: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)chore
: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
-
Discoverability Makes it easy to understand where to perform actions For example clear focal points (call to actions, images and headers), visual hiearchy (content structured in order of priority), obvious navigation systems all constitute to good discoverability.
-
Feedback Communicates response to our actions When interacting with a product or interface we need some way to communicate the result of our actions. Without any immediate feedback, we are left wondering whether our action has had an impact. Good feed must be immediate, informative, planned (unobstrusive) and prioritized.
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
This file contains hidden or 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
cat > ~/.local/share/applications/firefoxDeveloperEdition.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Firefox Developer Edition | |
Exec=/opt/firefox/firefox | |
Icon=/opt/firefox/browser/chrome/icons/default/default128.png | |
Terminal=false | |
Type=Application | |
Categories=Network;WebBrowser;Favorite; | |
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognitos; |
This file contains hidden or 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 | |
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
exit 1 # exit with failure status | |
fi | |
done |
NewerOlder