Skip to content

Instantly share code, notes, and snippets.


Chad Lavimoniere chadlavi

View GitHub Profile
alexjlockwood / print-unlinked-colors.ts
Created Feb 3, 2020
Prints nodes that have fill/stroke colors that aren't linked to a style.
View print-unlinked-colors.ts
.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(`${}'s fill color is not linked to a style`);
if ('strokes' in node && 'strokeStyleId' in node) {
if (node.strokes.length > 0 && node.strokeStyleId !== '') {
alexjlockwood / generate-style-descriptions.ts
Last active Oct 2, 2021
Generates style descriptions for each color style in the current Figma file.
View generate-style-descriptions.ts
// 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;
chadlavi / fp6.user.js
Last active Jun 6, 2020
fp6 accessibility
View fp6.user.js
// ==UserScript==
// @name 6dot accessibility patch
// @version 4.0.6
// @namespace
// @author Chad Lavimoniere
// @grant none
// @include http*://6.*.org/*
// @downloadURL
// @updateURL
// ==/UserScript==
chadlavi / youtube-embedder.user.js
Last active Oct 16, 2020
a js script to embed youtube videos when a youtube url is present
View youtube-embedder.user.js
// ==UserScript==
// @name youtube embedder
// @version 2.0.3
// @namespace
// @downloadURL
// @updateURL
// @description embed youtube videos when a url is present
// @author Chad Lavimoniere
// @exclude http*://**
// @exclude http*://**
View Disable Device Enrollment Notification on

Disable Device Enrollment Notification on

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
#!/usr/bin/env python3
# taken from
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:4443
import http.server
jhermsmeier /
Last active Apr 24, 2019
Oblique Strategies

Oblique Strategies

Over One Hundred Worthwhile Dilemmas

Created by Brian Eno and Peter Schmidt and first published in 1975. Each card offers a challenging constraint intended to help artists (particularly musicians) break creative blocks by encouraging lateral thinking.

Wikipedia / Oblique Strategies

boogah / ale.bash
Last active Mar 25, 2021
Never think about maintaining your homebrew install again with this shitty (but useful) shell script & cron job!
View ale.bash
echo ""
echo "`date`: RUNNING: brew update"
/usr/local/bin/brew update
echo "`date`: FINISHED: brew update"
echo ""
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
pfig /
Created Feb 12, 2012
Make a multi-resolution favicon.ico from a source image, using ImageMagick
# from
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