Skip to content

Instantly share code, notes, and snippets.

@tswicegood
tswicegood / .gitconfig
Last active August 4, 2020 16:42
Couple of my favorite git aliases
[alias]
st = status
di = diff
staged = "diff --staged"
amend = "commit --amend"
delete-merged = "!git branch --merged | egrep -v '^\\*' | xargs git branch -d"
pad = "!git pull ${1:-origin} --prune && git delete-merged"
fad = "!git fetch ${1:-origin} --prune && git delete-merged"
#!/usr/bin/env bash
NAMESPACE=${1:-default}
DEPLOYMENTS=$(kubectl get deployments -n "${NAMESPACE}" -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}')
for d in $DEPLOYMENTS; do
echo "Checking… $d"
kubectl -n $NAMESPACE rollout status --watch deployment $d;
done
@tswicegood
tswicegood / environment.yml
Last active November 17, 2021 23:22
Simple scraper for looking through a bunch of saved Craigslist listings for a phone number
# Conda environment file -- these packages are required for this script to work
name: craigslist
dependencies:
- lxml
- pip
- python=3.4*
- requests
- pip:
- aiohttp
- pyquery
@tswicegood
tswicegood / gist:29a64ba7f3c07cbd5381
Created April 11, 2015 05:39
Talk submission to ONA

Newb's Mind, Expert's Mind

Expertise syndrome is a silent killer of knowledge in information-based industries – whether that’s a news room or a tech shop. Remembering what it was like to use your tools when you didn't know what you didn't know makes it harder for you to communicate with people who are starting out. How do you put yourself in the beginner's mind? Can doing that help you create the next generation of experts in your community? This talk explores those themes and helps you find and implement strategies to share your knowledge in a way that's accessible to everyone, regardless of where they are on their journey.

In A Tweet

Newb's Mind, Expert Mind: How to teach beginners by changing the way you think.

How does your submission contribute to the diversity of the conference?

@tswicegood
tswicegood / gist:cc27a27a50797d9712c4
Created March 24, 2015 01:34
Data associated with Mother Jones story on income inequality
X.1,X.2
Wall Street bonuses in 2014,28.5
Income of all Americans working full-time at minimum wage in 2014,14
@tswicegood
tswicegood / React-Todo-Example-in-CoffeeScript.markdown
Last active August 29, 2015 14:13
React Todo Example in CoffeeScript
@tswicegood
tswicegood / gunicorn
Created November 21, 2014 17:03 — forked from hhuuggoo/gunicorn
import os
from os.path import join
from blaze.server import Server
from bambooclient import Client, autoload
def make_app():
basedir = os.environ.get('BAMBOO_BASEDIR', os.getcwd())
data_filename = os.environ.get('BAMBOO_DATAFILE', False)

Keybase proof

I hereby claim:

  • I am tswicegood on github.
  • I am tswicegood (https://keybase.io/tswicegood) on keybase.
  • I have a public key whose fingerprint is 791B 1944 7650 B4A5 F612 20E6 B4DC 8BF7 51C8 7987

To claim this, I am signing this object:

$ traceroute api.dropbox.com
traceroute to api.v.dropbox.com (108.160.166.253), 64 hops max, 52 byte packets
1 33.sub-66-174-43.myvzw.com (66.174.43.33) 4241.883 ms 2174.343 ms 71.135 ms
2 49.sub-69-83-103.myvzw.com (69.83.103.49) 57.548 ms 3588.356 ms 3891.173 ms
3 194.sub-69-83-103.myvzw.com (69.83.103.194) 1235.232 ms 76.562 ms 58.914 ms
#!/bin/bash
#
# Install Postgres 9.2, PostGIS and create PostGIS template on an Ubuntu 12.04 Server
# add official postgresql.org ubuntu repos (http://wiki.postgresql.org/wiki/Apt)
# Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg.
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg2.list
# Import the repository key from http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc, update the package lists, and start installing packages: