Skip to content

Instantly share code, notes, and snippets.

@daveslutzkin
daveslutzkin / install-postgres.sh
Last active November 3, 2015 22:58
Install Postgres from PPA
echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4 libpq-dev postgresql-contrib-9.4
sudo vim /etc/postgresql/*/main/pg_hba.conf
@daveslutzkin
daveslutzkin / install-docker.sh
Created November 3, 2015 23:01
Install docker from PPA
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install docker-engine
@daveslutzkin
daveslutzkin / iam-groups-and-policies.sh
Last active November 15, 2015 00:31
AWS CLI show IAM groups and policies by user
for full_username in `aws iam list-users | jq '.Users[].UserName'`
do
username=`echo $full_username | tr -d '"'`
echo $username \\t groups `aws iam list-groups-for-user --user-name $username | jq '.Groups[].GroupName' | tr '\n' ',' | tr -d '"'` \\t policies `aws iam list-attached-user-policies --user-name $username | jq '.AttachedPolicies[].PolicyName' | tr '\n' ',' | tr -d '"'`
done
@daveslutzkin
daveslutzkin / gist:d315ea593d1dcb6a17ab
Last active March 3, 2016 11:09
nginx re-resolve upstream dns
# nginx will only re-resolve a hostname for a proxy if it's a variable
set $feedback "FEEDBACK";
resolver RESOLVER; # set from $(grep nameserver /etc/resolv.conf | head -1 | awk '{ print $2; }')
location / {
proxy_pass http://$feedback;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_redirect off;
We’re looking for a Senior Front-End Dev or Front-End Architect or Javascript Wrangler for Stax.
Stax helps massive companies manage AWS. We’re a pretty good small team (8) funded out of a consulting company. Been building
for about 9 months, startup feel blah blah blah.
Front-end stack is React+Relay+GraphQL, lots of data viz which at the moment is mostly Plotly but will move in the direction
of bespoke SVG and D3 as it evolves. So if you like that sort of work we should talk. Also all the usual complex web app
things to wrestle with. Back-end is Ruby+Rails(ish)+Postgres+Redshift.
This person would be taking leadership of the whole front-end and making sure we’re doing things good, working closely with
# From https://launchpad.net/~ansible/+archive/ubuntu/ansible
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
echo "deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install ansible