Skip to content

Instantly share code, notes, and snippets.

View taoteg's full-sized avatar
👁️‍🗨️
Abiding

John Gentle taoteg

👁️‍🗨️
Abiding
  • Austin, TX
View GitHub Profile
@taoteg
taoteg / postgres-cheatsheet.md
Created February 2, 2018 15:20 — 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)
@taoteg
taoteg / curl.md
Created December 14, 2017 02:21 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@taoteg
taoteg / loadshp2mongo.py
Created September 27, 2016 23:18 — forked from mittenchops/loadshp2mongo.py
Loading shapefiles into mongodb. This all actually comes from here: http://geospatialpython.com/ But this is wrapped up a little nicer.
# http://geospatialpython.com/
import json, pymongo, shapefile
from json import dumps
database = 'geo'
connection = pymongo.MongoClient()
db = getattr(connection,database)
def renamesh2json(x):
d = x.split(".")
#!/bin/bash
#
# Requires:
# - gdal_sieve.py
# - ogr2ogr (GDAL)
# - topojson (node.js)
# Grab the relative directory for source file.
SRC_DIR=`dirname $0`
@taoteg
taoteg / index.html
Created September 9, 2016 03:32 — forked from marcneuwirth/index.html
D3 Globe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<svg id="defs">
<defs>
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
set -o verbose
set -o errexit
echo '* Create and initialize a repository.'
git init gitflow-tutorial
cd gitflow-tutorial/
git flow init -d
echo '* Develop a Feature'
@taoteg
taoteg / README.md
Created May 11, 2016 15:11 — forked from kgryte/README.md
Anscombe's Quartet + D3.js

Anscombe's Quartet

D3.js visualization of Anscombe's Quartet. Each dataset in the quartet is graphed separately along with its linear best fit. While all datasets have the same summary statistics (mean, variance, correlation, linear fit), their structures differ markedly.

Anscombe used the quartet in his seminal paper "Graphs in Statistical Analysis" to emphasize the importance of data visualization for exploratory data analysis. Such visualization exploration enables the analyst to make more informed analytical decisions and conclusions.