Skip to content

Instantly share code, notes, and snippets.

@dfkaye
dfkaye / html-skeleton-with-csp-aria.html
Last active May 21, 2023 22:06
Expanded version of Josh W. Comeau (2020), HTML Skeleton (adds CSP, ARIA, custom tag name)
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Josh W Comeau (2020), HTML Skeleton (starter for every web page) → https://joshwcomeau.com/snippets/html/html-skeleton -->
<!-- see also my HTML5 boilerplate gist → https://gist.github.com/dfkaye/1ed260cf8cf1990b13aaa272dab0bf97 -->
<title>Your Page Title</title>
@Michaelvilleneuve
Michaelvilleneuve / i18n.test.js
Created August 8, 2018 10:14
Jest tests to check for missing translations, unused keys and incomplete translation files
/* eslint-disable */
import fr from 'config/locales/fr';
import en from 'config/locales/en';
import { exec } from 'child_process';
describe('i18n', () => {
test('Translations keys are the same for every language', () => {
const translationKeysEn = iterate(en, '', []);
const translationKeysFr = iterate(fr, '', []);
@n1ru4l
n1ru4l / index.js
Created August 7, 2017 10:47
Fetch blob and convert to base64
export const fetchAsBlob = url => fetch(url)
.then(response => response.blob());
export const convertBlobToBase64 = blob => new Promise((resolve, reject) => {
const reader = new FileReader;
reader.onerror = reject;
reader.onload = () => {
resolve(reader.result);
};
reader.readAsDataURL(blob);
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 23, 2024 14:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@tomysmile
tomysmile / mac-setup-redis.md
Last active May 23, 2024 03:17
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@jwebcat
jwebcat / gist:5122366
Last active March 25, 2024 18:25 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1