csrutil disable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const code = [ | |
'ArrowUp', 'ArrowUp', 'ArrowDown', | |
'ArrowDown', 'ArrowLeft', 'ArrowRight', | |
'ArrowLeft', 'ArrowRight', 'KeyB', 'KeyA' | |
]; | |
const useKonami = () => { | |
const [isActive, setActive] = useState(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
figma.root.children | |
.flatMap(pageNode => pageNode.findAll(n => true)) | |
.forEach(node => { | |
if ('fills' in node && 'fillStyleId' in node) { | |
if (node.fills !== figma.mixed && node.fills.length > 0 && node.fillStyleId !== '') { | |
print(`${node.name}'s fill color is not linked to a style`); | |
} | |
} | |
if ('strokes' in node && 'strokeStyleId' in node) { | |
if (node.strokes.length > 0 && node.strokeStyleId !== '') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the list of color styles in the current Figma file. | |
const colorStyles = figma.getLocalPaintStyles(); | |
const updatedColorStyles = colorStyles.filter(style => { | |
const { paints } = style; | |
if (paints.length !== 1) { | |
// Skip styles containing multiple colors. | |
return false; | |
} | |
const [paint] = paints; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 6dot accessibility patch | |
// @version 4.0.6 | |
// @namespace https://gist.github.com/chadlavi/1c57c8568a0ff295668b80a366f10a0d | |
// @author Chad Lavimoniere | |
// @grant none | |
// @include http*://6.*.org/* | |
// @downloadURL https://gist.github.com/chadlavi/1c57c8568a0ff295668b80a366f10a0d/raw/fp6.user.js | |
// @updateURL https://gist.github.com/chadlavi/1c57c8568a0ff295668b80a366f10a0d/raw/fp6.user.js | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name youtube embedder | |
// @version 2.0.3 | |
// @namespace https://gist.github.com/chadlavi/27c08ea6648d375c3f5de3ec7f43a015 | |
// @downloadURL https://gist.github.com/chadlavi/27c08ea6648d375c3f5de3ec7f43a015/raw/youtube-embedder.user.js | |
// @updateURL https://gist.github.com/chadlavi/27c08ea6648d375c3f5de3ec7f43a015/raw/youtube-embedder.user.js | |
// @description embed youtube videos when a url is present | |
// @author Chad Lavimoniere | |
// @exclude http*://*youtube.com* | |
// @exclude http*://*facebook.com* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import http.server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "" | |
echo "`date`: RUNNING: brew update" | |
/usr/local/bin/brew update | |
echo "`date`: FINISHED: brew update" | |
echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# from | |
# http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html | |
convert source-WxW.png -resize 256x256 -transparent white favicon-256.png | |
convert favicon-256.png -resize 16x16 favicon-16.png | |
convert favicon-256.png -resize 32x32 favicon-32.png | |
convert favicon-256.png -resize 64x64 favicon-64.png | |
convert favicon-256.png -resize 128x128 favicon-128.png |
NewerOlder