Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / modal.css
Created June 8, 2020 17:40
React Modal Styles
/* Modal */
.ReactModalPortal > div{
opacity: 0;
}
.ReactModalPortal .ReactModal__Overlay {
align-items: center;
display: flex;
justify-content: center;
transition: opacity .2s ease-in-out;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 1, 2024 19:56
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

@mdegat01
mdegat01 / update_notifications.yaml
Last active May 1, 2024 19:56
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: '2022.4.0'
domain: automation
input:
update_entities:
name: Update entities
description: >-
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@rxaviers
rxaviers / gist:7360908
Last active May 1, 2024 19:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mashpie
mashpie / i18n-express-hbs-app.js
Last active May 1, 2024 19:55
express + i18n-node + handlebars and avoid concurrency issues
// require modules
var express = require('express'),
i18n = require('i18n'),
hbs = require('hbs'),
app = module.exports = express();
i18n.configure({
locales: ['en', 'fr'],
cookie: 'locale',
directory: "" + __dirname + "/locales"
@rpivo
rpivo / index.md
Last active May 1, 2024 19:54
Encrypting & Decrypting Sensitive Data With the Web Crypto API

Encrypting & Decrypting Sensitive Data With the Web Crypto API

Chris Veness created a really great gist that shares code to encrypt and decrypt data using the Web Crypto API here.

This gist breaks down the code in that gist step by step, detailing a real-world scenario with actual data.

It might be helpful to have that gist open in another tab and use this gist to walk through each line of code.

One interesting use case for this would be to encrypt on a client, and then decrypt in the cloud with something like a Lambda function. In order to do this, you could use Node's latest version as of this gist, version 15, which includes a webcrypto module that's designed to be a Node implementation of the Web Crypto API. Lambdas can't use v15 by default -- however, you can create a custom Lambda layer that contains v15.

{"version":3,"sources":["app/public/scss/style.css"],"names":["'UTF-8'","url(","'https://fonts.googleapis.com/css?family=Montserrat:400,700'","/*!\n * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */","/* FONT PATH\n * -------------------------- */","@font-face ","font-family","'FontAwesome'","src","'../fonts/fontawesome-webfont.eot?v=4.7.0'","'../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0'","format(","'embedded-opentype'","'../fonts/fontawesome-webfont.woff2?v=4.7.0'","'woff2'","'../fonts/fontawesome-webfont.woff?v=4.7.0'","'woff'","'../fonts/fontawesome-webfont.ttf?v=4.7.0'","'truetype'","'../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular'","'svg'","font-weight","normal","font-style",".fa","display","inline-block","font","14","px","/","1","FontAwesome","font-size","inherit","text-rendering","auto","-webkit-font-smoothing","antialiased","-moz-osx-font-smoothing","grayscale","/* makes th
(async function () {
const IN = "10:00";
const OUT = "18:00";
const OFFSET = 10;
const rand = (n) => n - Math.floor(Math.random() * (2 * n + 1));
const offsetHour = (h, o) => {
let [hh, mm] = h.split(":");
hh = Number(hh);