Skip to content

Instantly share code, notes, and snippets.

🍕

Chad Lavimoniere chadlavi

🍕
View GitHub Profile
@chadlavi
chadlavi / no-ads-hn.user.js
Last active Jun 18, 2020
automatically click "hide" on ads in hackernews
View no-ads-hn.user.js
// ==UserScript==
// @name No ads on HN
// @version 0.0.1
// @author Chad Lavimoniere
// @grant none
// @include https://news.ycombinator.com/*
// @downloadURL https://gist.github.com/chadlavi/888a0889dadf82a60ba0f32017a5e9cb/raw/no-ads-hn.user.js
// @updateURL https://gist.github.com/chadlavi/888a0889dadf82a60ba0f32017a5e9cb/raw/no-ads-hn.user.js
// ==/UserScript==
@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 Jun 6, 2020
fp6 accessibility
View fp6.user.js
// ==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==
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":
You can’t perform that action at this time.