Skip to content

Instantly share code, notes, and snippets.

View chadlavi's full-sized avatar
👨‍💻
Working

Chad Lavimoniere chadlavi

👨‍💻
Working
View GitHub Profile
@chadlavi
chadlavi / night-mode.user.js
Last active January 27, 2019 20:24
Night Mode
// ==UserScript==
// @name Night Mode
// @namespace https://gist.github.com/chadlavi/d57509a35bc03305b28b3938dab0594f
// @downloadURL https://gist.github.com/chadlavi/d57509a35bc03305b28b3938dab0594f/raw/night-mode.user.js
// @updateURL https://gist.github.com/chadlavi/d57509a35bc03305b28b3938dab0594f/raw/night-mode.user.js
// @version 2.53
// @description turn on night mode between the night and morning times
// @author Chad Lavimoniere
// @include http*://6.f*.org/*
// @grant none
@chadlavi
chadlavi / Preferences.sublime-settings
Last active January 9, 2019 01:50
my sublime text prefs
{
"color_scheme": "Packages/Monokai Dark/Monokai Dark.tmTheme",
"drag_text": false,
"font_size": 12,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"rulers":
@chadlavi
chadlavi / get_images.sh
Created October 16, 2018 15:18
a simple script to get an arbitrary number of sample images from unsplash, organized by aspect ratio
#!/bin/sh
mkdir -p example_images/landscape
mkdir -p example_images/portrait
loop=0
iterations=50
while [ $loop -lt $iterations ]; do
x=$(( $RANDOM % 950 + 50 ))
@chadlavi
chadlavi / notes.sh
Created July 16, 2018 17:50
add me to your bash_functions
note () {
local note="$HOME/notes.md"
if [ ! -z "$1" ]
then
gdate +###\ %Y-%m-%d\ %H:%M >> $note
echo "$@" >> $note
echo "" >> $note
else
vim + -c ':r! gdate +\#\#\#\ \%Y-\%m-\%d\ \%H:\%M && echo' +star $note
fi
@chadlavi
chadlavi / ubuntu_16.04_certbot.sh
Created April 26, 2018 18:09
Install certbot on Ubuntu 16.04
#!/bin/bash
# Install certbot on Ubuntu 16.04
# if parameter "run" is passed to the script like `ubuntu_16.04_certbot.sh run`, it also runs "sudo certbot certonly" after install
# cf. https://certbot.eff.org/lets-encrypt/ubuntuxenial-other
sudo apt-get update -y &&\
sudo apt-get install software-properties-common &&\
sudo add-apt-repository ppa:certbot/certbot &&\
sudo apt-get update -y &&\
// ==UserScript==
// @name image hider
// @namespace https://gist.github.com/chadlavi/fae974f20b5d7567fbf6a94931a0e2d7
// @downloadURL https://gist.github.com/chadlavi/fae974f20b5d7567fbf6a94931a0e2d7/raw/image-hider.user.js
// @updateURL https://gist.github.com/chadlavi/fae974f20b5d7567fbf6a94931a0e2d7/raw/image-hider.user.js
// @version 1.26
// @description hide images until you want them
// @include https://6.f*.org/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
// @copyright 2018, Chad Lavimoniere
// ==UserScript==
// @name Remove title counts
// @namespace https://gist.github.com/chadlavi/18e538397ad9248cda79950d0d5c3919
// @downloadURL https://gist.github.com/chadlavi/18e538397ad9248cda79950d0d5c3919/raw/hide-tile-counts.user.js
// @updateURL https://gist.github.com/chadlavi/18e538397ad9248cda79950d0d5c3919/raw/hide-tile-counts.user.js
// @version 1.1
// @description make the title of the page always be "Facebook" when on facebook
// @author Chad Lavimoniere
// @include http*://*.facebook.com/*
// @include http*://twitter.com/*
// ==UserScript==
// @name show titles
// @namespace https://gist.github.com/chadlavi/d4e0cf8af2d4f40bd0704fa61138acf0/raw/show-titles.user.js
// @downloadURL https://gist.github.com/chadlavi/d4e0cf8af2d4f40bd0704fa61138acf0/raw/show-titles.user.js
// @updateURL
// @version 1.1
// @description show the titles of older and newer entries
// @author Chad Lavimoniere
// @include http://6.f*.org/file/view/*
// @grant none
@chadlavi
chadlavi / hackernews-open-link-new-tab.user.js
Last active February 12, 2018 02:00
hacker news open links in new tabs
@chadlavi
chadlavi / techcrunch-open-new-tab.user.js
Last active February 12, 2018 01:58
open tech crunch links in new tabs
// ==UserScript==
// @name techcrunch open article in new tab
// @namespace https://gist.github.com/chadlavi/f5ca94ccd1aafed21d1e1e250dc954e0
// @downloadURL https://gist.github.com/chadlavi/f5ca94ccd1aafed21d1e1e250dc954e0/raw/techcrunch-open-new-tab.user.js
// @updateURL https://gist.github.com/chadlavi/f5ca94ccd1aafed21d1e1e250dc954e0/raw/techcrunch-open-new-tab.user.js
// @version 1.2
// @description Open tech crunch articles in new tabs
// @author You
// @match *techcrunch.com/*
// @grant none