Skip to content

Instantly share code, notes, and snippets.

View gopperman's full-sized avatar

Greg Opperman gopperman

View GitHub Profile
@gopperman
gopperman / .block
Last active March 5, 2019 04:01
Worcester
license: mit
height: 500
border: no
gistup
@gopperman
gopperman / gist:18cb66078372d3261420829630230b80
Created October 27, 2017 15:13
Install postgis-2.3.2 with postgres@9.6
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb
#pg_config --pkglibdir is useful for finding your $libdir
cp -a /usr/local/share/postgresql/extension/postgis* /usr/local/Cellar/postgresql@9.6/9.6.5/share/postgresql@9.6/extension/
cp -a /usr/local/lib/postgresql/postgis-2.3.so /usr/local/Cellar/postgresql@9.6/9.6.5/lib/postgis-2.3
cp -a /usr/local/lib/postgresql/rtpostgis-2.3.so /usr/local/Cellar/postgresql@9.6/9.6.5/lib/
@gopperman
gopperman / postgres-cheatsheet.md
Created October 23, 2017 20:48 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@gopperman
gopperman / functions.php
Created July 19, 2017 03:41
Add a custom meta field to wordpress API response
function my_rest_prepare_post( $data, $post, $request ) {
$_data = $data->data;
$_data['URL'] = get_post_meta( $post->ID, 'URL', true );
$data->data = $_data;
return $data;
}
add_filter( 'rest_prepare_post', 'my_rest_prepare_post', 10, 3 );
@gopperman
gopperman / index.html
Created March 23, 2017 19:33
HTML5 boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>untitled</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
gistup
license: mit
height: 720
border: no
license: mit
height: 720
border: no
@gopperman
gopperman / README.md
Created November 11, 2016 21:36 — forked from natebates/README.md
CSS Cheeseburger

Received a McDonald's flyer and thought the simple cheeseburger could be easily CSS'd.

Perhaps I'll update it to be bulletproof cross-browser, but for now the cheese drips look best in Chrome.