Skip to content

Instantly share code, notes, and snippets.

Chad Lavimoniere chadlavi

Block or report user

Report or block chadlavi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chadlavi
chadlavi / rainbowLog.ts
Last active Feb 29, 2020 — forked from Benargee/rainbowLog.js
A console.log with a little more... flair.
View rainbowLog.ts
const rainbow = (s: string) => {
const colors = [
'red',
'orange',
'yellow',
'green',
'blue',
'indigo',
'violet',
]
@chadlavi
chadlavi / remove-badUTM.user.js
Last active Feb 26, 2020
a greasemonkey script to remove bad UTM tags from link HREFs
View remove-badUTM.user.js
const removeBadTags = (badTags) => {
const links = [...document.querySelectorAll('a')]
links.forEach(
(l) => {
badTags.forEach(
(b) => {
const badFirstRegex = RegExp(`[\?]${b}=[^\?&#]*`, 'gi')
const badSecondRegex = RegExp(`[&]${b}=[^\?&#]*`, 'gi')
if (l.href.match(badFirstRegex)) {
@chadlavi
chadlavi / yarnlinks.sh
Last active Mar 28, 2020
a bash function to quickly identify any yarn links you've got set up currently
View yarnlinks.sh
@chadlavi
chadlavi / hn.user.js
Last active Apr 14, 2020
give HN a dark mode
View hn.user.js
// ==UserScript==
// @name HN accessibility patch
// @version 1.0.0
// @namespace https://gist.github.com/chadlavi/38caf8b4ed7dcae3c4b5d5caff2ff3e7
// @author Chad Lavimoniere
// @grant none
// @include https://news.ycombinator.com/*
// @downloadURL https://gist.github.com/chadlavi/38caf8b4ed7dcae3c4b5d5caff2ff3e7/raw/hn.user.js
// @updateURL https://gist.github.com/chadlavi/38caf8b4ed7dcae3c4b5d5caff2ff3e7/raw/hn.user.js
// ==/UserScript==
@chadlavi
chadlavi / combine-imports.sh
Last active May 4, 2019
a (macOS-targed) bash script to combine multiple named imports from a single library into one statement
View combine-imports.sh
#!/bin/bash
# In this script, the library I maintain for work, "@casecommons/cbp-undercase"
# is used. I'll abstract it out in a future version of this so that the syntax
# is more like "combine-imports.sh [file] [library name]
imports=$(cat $1 | grep '@casecommons/cbp-undercase' | wc -l)
if [[ $imports -le 1 ]]; then
# next line commented out for scripted use
# echo "$1: no imports to combine."
View google-assistant-wishlist.md

Things I wish Google Assistant could do

This is a running list of the use cases that come up in my everyday life that I wish Google Assistant (either on my phone or on a Google Home device) could handle.

repeated/scheduled routines

"Hey Google, run routine Cleaning Time every Sunday at 11am"

location-triggered routines

"Hey Google, run routine [something] every time I get home"

data-dependent conditional logic

@chadlavi
chadlavi / fp6.user.js
Last active Apr 28, 2020
fp6 accessibility
View fp6.user.js
// ==UserScript==
// @name 6dot accessibility patch
// @version 4.0.5
// @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==
View Preferences.sublime-settings
{
"color_scheme": "Packages/Monokai Dark/Monokai Dark.tmTheme",
"drag_text": false,
"font_size": 12,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"rulers":
@chadlavi
chadlavi / spotify-embed.user.js
Last active Nov 1, 2018
a js script to embed spotify playlists or albums when a spotify share url is present
View spotify-embed.user.js
// ==UserScript==
// @name spotify embedder
// @version 1
// @namespace https://gist.github.com/chadlavi/eba2e3420fb9c1a6a891f8ed2c29e2ae
// @downloadURL https://gist.github.com/chadlavi/eba2e3420fb9c1a6a891f8ed2c29e2ae/raw/spotify-embed.user.js
// @updateURL https://gist.github.com/chadlavi/eba2e3420fb9c1a6a891f8ed2c29e2ae/raw/spotify-embed.user.js
// @description embed spotify player when a url is present
// @author Chad Lavimoniere
// @exclude http*://*youtube.com*
// @exclude http*://*facebook.com*
You can’t perform that action at this time.