Skip to content

Instantly share code, notes, and snippets.

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

Chad Lavimoniere chadlavi

👨‍💻
Working
View GitHub Profile

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 April 2, 2017 03:10
js bookmarklet to updoot all posts on a page
javascript:(function(){$('div#siteTable%20.thing%20.up').trigger('click');}());
@chadlavi
chadlavi / find_ssh.sh
Created April 2, 2017 03:12
bash one-liner to get IPs of all the machines on local network that have ssh running and open
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 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
@chadlavi
chadlavi / hackernews-open-link-new-tab.user.js
Last active February 12, 2018 02:00
hacker news open links in new tabs
// ==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
// ==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 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 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 &&\
@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