Skip to content

Instantly share code, notes, and snippets.


Connor Dillon connoro7

View GitHub Profile
connoro7 / .vimrc
Created May 6, 2020
.vimrc Settings
View .vimrc
set number
set ruler
filetype indent on
set ai
set mouse=a
set incsearch
set hlsearch
set paste
set confirm
set ignorecase
connoro7 /
Last active May 24, 2020
Bash script to export all SSH keys (public and private) to external folder for backup on a cold storage drive.
# Edit EXPORT_FOLDER to change the export location
# Append (or remove) any additional key locations you may have to the KEYS array.
KEYS=(~/.gnupg ~/.pki/nssdb ~/.gnome2/keyrings ~/.ssh /usr/local/apache2/conf/ssl.crt/server.crt /usr/local/apache2/conf/ssl.key/server.key /etc/ssh /etc/ssl/private /etc/cups/ssl)
echo -e "SSH Keys being sent to: \033[44;97m$EXPORT_FOLDER\033[0m"
for FILE in "${KEYS[@]}"
# for use with OSX
connoro7 / exa Enhanced v1
Created Jun 4, 2020
Exa alias options + documentation
View exa Enhanced v1
# Author: Connor Dillon
# Created: June 4 2020
# Some useful `exa` aliases meant to replace standard `ls` usage.
# The aliases use `l` instead of `exa` to make use of muscle memory from typing `ls` all the time :)
# Use `$ exahelp` to print documentation to console
# Download `exa` via:
# OSX: $ brew install exa
# Linux: $ sudo apt-get install exa

Keybase proof

I hereby claim:

  • I am connoro7 on github.
  • I am dillpickles ( on keybase.
  • I have a public key ASBU-ywQR77Pny0QblUqQNXwqsHeiBH5WE7mWj2r3dH24Qo

To claim this, I am signing this object:

View express-starter.js
const express = require('express');
const morgan = require('morgan');
const cors = require('cors');
const app = express();
app.get('/', (req, res) => {
connoro7 /
Created Jul 16, 2020
Heroku Quick Reference Sheet

Heroku Quick Reference

heroku login # login once
heroku create [name] # Initializes heroku app and adds remote.
heroku addons:create heroku-postgresql # add a postgres db addon to your heroku app
heroku logs [--tail] # Shows heroku server terminal
heroku pg:psql # connect to heroku addon database server
heroku config # shows heroku environment variables
  - heroku config:set clown=fiesta # set a config variable
connoro7 /
Created Jul 16, 2020
Async & Await Reference Sheet

async & await


request('', (error, response, body) => {
  const results = JSON.parse(body);
connoro7 /
Created Jul 16, 2020
Arrow Function vs. Functional IIFEs

Arrows Functions vs. Function IIFEs

When creating an IIFE, use a regular function, NOT an arrow function.

With a fat arrow, this is bound to the this of the surrounding code (in this case Window or Global).

(() => {
  'use strict';
connoro7 /
Created Jul 16, 2020
Trees Reference Sheet


A collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated (a child can only have 1 parent), and none points to the root.

Recursive Definition