Skip to content

Instantly share code, notes, and snippets.

@ArtoCully
ArtoCully / JAWS vs VoiceOver screen readers.md
Created May 4, 2023 12:51 — forked from cfarm/JAWS vs VoiceOver screen readers.md
JAWS vs VoiceOver: What JAWS, VoiceOver and other screen readers have in common and where they differ, plus how this should be considered in the design and development process
@ArtoCully
ArtoCully / github-conventional-comments.js
Created October 19, 2022 11:08 — forked from ifyoumakeit/github-conventional-comments.js
GitHub Conventional Comments (instructions to install in comment below code)
(async function generateReplies(document) {
// https://conventionalcomments.org/#labels
const LABEL = {
praise: "praise",
nitpick: "nitpick",
suggestion: "suggestion",
issue: "issue",
question: "question",
thought: "thought",
chore: "chore",
@ArtoCully
ArtoCully / conventional-commits.md
Created August 17, 2022 08:54 — forked from Zekfad/conventional-commits.md
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • 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
@ArtoCully
ArtoCully / README.md
Created May 20, 2022 14:23 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@ArtoCully
ArtoCully / seven-principles.md
Last active February 20, 2022 16:09
design-notes

Refresher - Seven Fundemental Principles of Design

  1. 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.

  2. 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.

@ArtoCully
ArtoCully / postgres-cheatsheet.md
Created December 20, 2021 09:45 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

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)
@ArtoCully
ArtoCully / docker-postgres-local-setup.md
Last active December 13, 2021 15:17
Docker Postgres Local Setup

Steps to setup local docker postgres

  1. Create a directory to store postgres data
mkdir -p ${HOME}/postgres-data/
  1. Run postgres image
docker run -d \
--name dev-postgres
@ArtoCully
ArtoCully / iterm2-solarized.md
Created December 8, 2021 12:37 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@ArtoCully
ArtoCully / .bash
Created March 8, 2021 09:34
Firefox Developer Edition Ubuntu
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;
@ArtoCully
ArtoCully / pre-commit.sh
Created December 14, 2020 17:17 — forked from dahjelle/pre-commit.sh
Pre-commit hook for eslint, linting *only* staged changes.
#!/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