Skip to content

Instantly share code, notes, and snippets.

View brentmakesapps's full-sized avatar

Brent Stradling brentmakesapps

View GitHub Profile
/*
* Generates an SVG from a remote url
*/
import React, {useEffect, useState} from 'react'
export default ({ url }) => {
const [element, setElement] = useState(null);
const getSvgFromUrl = url => {
return fetch(url)
@brentmakesapps
brentmakesapps / colorShader.js
Created April 22, 2020 19:32
Change hex color values by darkening, lightening, and transparency
const LightenDarkenColor = (color, amount, pound) => {
let usePound = false;
if (color[0] === '#') {
color = color.slice(1);
usePound = true;
}
if(pound !== undefined) usePound = pound
const num = parseInt(color, 16);
@brentmakesapps
brentmakesapps / cloudSettings
Last active September 28, 2020 23:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-28T23:52:03.803Z","extensionVersion":"v3.4.3"}
nav
ul
- for (i = 1; i <= 8; i++)
li(class="link link-" + i)
svg(width="24" height="24" viewBox="0 0 24 24")
path(d="M4,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4M12,11L20,6H4L12,11M4,18H20V8.37L12,13.36L4,8.37V18Z")
span Item