Skip to content

Instantly share code, notes, and snippets.


Lee Smith leesmith

Block or report user

Report or block leesmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leesmith /
Created Oct 9, 2019
Sync Nuxtjs dist folder to S3 and invalidate Cloudfront distribution
#!/usr/bin/env bash
# Sync generated site to S3 and invalidate Cloudfront distribution
if [ ! -f .env ]; then
echo "# Project environment not commit this file." >> .env
echo "AWS_CF_DIST_ID=" >> .env
echo "AWS_S3_URI=" >> .env
echo "Please add the necessary values to the .env file."
leesmith / postgres-commands.txt
Created Aug 12, 2019
Postgres dump & restore
View postgres-commands.txt
pg_dump --format=c --blobs --verbose --clean --file=some_db_name.dump some_db_name
pg_restore --verbose --no-acl --no-owner --dbname=some_db_name some_db_name.dump
leesmith / coinbase-clone.html
Created Jan 21, 2019
Tailwind CSS examples
View coinbase-clone.html
<!DOCTYPE html>
<meta charset='UTF-8'>
<link href="" rel="stylesheet">
<div class="font-sans bg-grey-lighter flex flex-col min-h-screen w-full">
leesmith / index.html
Created Oct 23, 2018
CSS maintenance server
View index.html
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Maintenance Page</title>
body{font-family:'IBM Plex Sans',sans-serif;line-height:1.6;font-size:1em;padding:0 20px}
#wrapper{width:100%;height:350px;margin:0 auto;position:absolute;top:50%;left:50%;margin-top:-175px;margin-left:-50%}

What separates the fleeting thrill of a “great idea” from the enduring rewards of great work?

These five facts:

  1. Great work is work that helps people. It’s not made great by accolades or praise from your peers… but by the experience of the people who actually use it. That’s work you can be proud of.
  2. Great work can be done by anyone. You don’t need to be “An Expert.” If you take the time to find out what people truly need, your work can help people now, and so you can do great work now.
  3. Great work is shipped work. Work that lives only in your brain or your hard drive can’t be great work. If you want your work to help people, you’ve got to get it into their hot little hands.
  4. Great work is work you can keep doing. If your work can’t sustain itself (aka with money and time off), you can’t keep doing it, which means you can’t keep helping people, and neither can your work. Great work takes care of you, so you can take care of it.
  5. Great work is never done. There can be nothing pe
leesmith / postgres-dump-all-and-restore.txt
Created Aug 25, 2017
Postgres dump cluster and restore
View postgres-dump-all-and-restore.txt
$ pg_dumpall > pg_all.sql
$ psql -U lsmith -f pg_all.sql postgres
leesmith /
Last active Nov 21, 2016
Git commands for keeping a tidy local repo

Prune remotes

git remote prune origin

Delete branches


leesmith /
Last active Jun 2, 2016
Upgrade Postgres via Homebrew
leesmith / non-ascii.txt
Created Sep 29, 2015
Highlight non-ASCII characters in VIM
View non-ascii.txt
View mysql-csv-dump.sql
select * from users into outfile 'users.csv' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';
You can’t perform that action at this time.