Skip to content

Instantly share code, notes, and snippets.

View JawsomeJason's full-sized avatar
💅
Bein' sassy

Jason Featheringham ⊙ω⊙ JawsomeJason

💅
Bein' sassy
View GitHub Profile
@JawsomeJason
JawsomeJason / colors.js
Last active May 21, 2018 06:07
List of colors with names.
/*
* Color names and values from http://chir.ag/projects/name-that-color/#6195ED
* rgb = Red, Green, Blue
* hsl = Hue, Saturation, Lightness
* hsv = Hue, Saturation, Value
* contrast = Readable contrast color via https://www.w3.org/TR/AERT/#color-contrast
* Y = Perceived Brightness
*/
const COLORS = {
@JawsomeJason
JawsomeJason / viewport-fluid.less
Created October 20, 2018 20:49
LESS Mixin to easily create fluid typography based on viewport information
// see https://css-tricks.com/snippets/css/fluid-typography/ for 🤯
.viewport-fluid(@property, @from, @to, @screen-min: @screen-sm, @screen-max: @screen-lg, @viewport-unit: vw) {
@{property}: @from;
@media (min-width: @screen-min) {
@{property}: calc(
@from + unit(@to - @from) * ((~"100@{viewport-unit}" - @screen-min) / unit(@screen-max - @screen-min))
);
}
@JawsomeJason
JawsomeJason / delete-alexa-scenes.js
Created February 26, 2019 21:18
Delete all Alexa scenes
/* go to https://alexa.amazon.com/spa/index.html#scenes and paste this into the console */
Array.prototype.slice.call(document.querySelectorAll('.d-connected-home-link-btn')).map(el => el.getAttribute('appliance-id')).forEach(id => { console.log(id); fetch(`https://alexa.amazon.com/api/phoenix/appliance/${id}`, { method: 'DELETE' }) })