Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕

Chad Lavimoniere chadlavi

🍕
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am chadlavi on github.
  • I am chadlavi (https://keybase.io/chadlavi) on keybase.
  • I have a public key whose fingerprint is AAF5 8032 7735 D90F 8F2C 37B2 B0EB ED41 A393 6440

To claim this, I am signing this object:

@chadlavi
chadlavi / reddit_upvote_all.js
Last active Apr 2, 2017
js bookmarklet to updoot all posts on a page
View reddit_upvote_all.js
javascript:(function(){$('div#siteTable%20.thing%20.up').trigger('click');}());
@chadlavi
chadlavi / find_ssh.sh
Created Apr 2, 2017
bash one-liner to get IPs of all the machines on local network that have ssh running and open
View find_ssh.sh
nmap -sV -p 22 192.168.0.1-254 | grep 'open\s*ssh' -B 3 | grep 192 | awk '{print $NF}'
@chadlavi
chadlavi / techcrunch-open-new-tab.user.js
Last active Feb 12, 2018
open tech crunch links in new tabs
View techcrunch-open-new-tab.user.js
// ==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
@chadlavi
chadlavi / hackernews-open-link-new-tab.user.js
Last active Feb 12, 2018
hacker news open links in new tabs
View hackernews-open-link-new-tab.user.js
View show-titles.user.js
// ==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
View hide-tile-counts.user.js
// ==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/*
View image-hider.user.js
// ==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
@chadlavi
chadlavi / ubuntu_16.04_certbot.sh
Created Apr 26, 2018
Install certbot on Ubuntu 16.04
View ubuntu_16.04_certbot.sh
#!/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 &&\
@chadlavi
chadlavi / notes.sh
Created Jul 16, 2018
add me to your bash_functions
View notes.sh
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