Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Lee Smith leesmith

🎯
Focusing
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
leesmith / deploy.sh
Created Oct 9, 2019
Sync Nuxtjs dist folder to S3 and invalidate Cloudfront distribution
View deploy.sh
#!/usr/bin/env bash
#
# Sync generated site to S3 and invalidate Cloudfront distribution
if [ ! -f .env ]; then
echo "# Project environment variables...do 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."
else
@leesmith
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
leesmith / coinbase-clone.html
Created Jan 21, 2019
Tailwind CSS examples
View coinbase-clone.html
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Coinbase</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
<div class="font-sans bg-grey-lighter flex flex-col min-h-screen w-full">
<div>
@leesmith
leesmith / index.html
Created Oct 23, 2018
CSS maintenance server
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<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>
<style>
html{font-size:18px}
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%}
View great-work.md

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
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
leesmith / repo-cleanup.md
Last active Nov 21, 2016
Git commands for keeping a tidy local repo
View repo-cleanup.md

Prune remotes

git remote prune origin

Delete branches

Locally:

@leesmith
leesmith / upgrade.md
Last active Jun 2, 2016
Upgrade Postgres via Homebrew
View upgrade.md
@leesmith
leesmith / non-ascii.txt
Created Sep 29, 2015
Highlight non-ASCII characters in VIM
View non-ascii.txt
/[^\x00-\x7F]
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.