Skip to content

Instantly share code, notes, and snippets.

# 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
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
@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;
@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 / 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 / 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
### Keybase proof
I hereby claim:
* I am daveslutzkin on github.
* I am daveslutzkin (https://keybase.io/daveslutzkin) on keybase.
* I have a public key whose fingerprint is F57C 68E3 1BBE EE43 581E 799A AA29 AD04 7A4E DCB0
To claim this, I am signing this object:
@daveslutzkin
daveslutzkin / install-node.sh
Last active November 11, 2017 23:44
Installs node
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_8.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_8.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install --yes nodejs
@daveslutzkin
daveslutzkin / phoenix.sh
Last active February 6, 2016 11:31
Elixir + Phoenix setup
# Install node (for brunch)
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_4.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_4.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install --yes nodejs
# Install erlang and elixir
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb &&\
sudo dpkg -i erlang-solutions_1.0_all.deb &&\
@daveslutzkin
daveslutzkin / nginx.conf
Last active September 20, 2017 20:04
Nginx conf for solid SSL/TLS
# Thin serving Rails.
upstream app_server {
server 127.0.0.1:3050 fail_timeout=0;
}
# SSL/TLS certificates - the key should be 4096 bit generated with: 'openssl genrsa -des3 -out server.key 4096'
ssl_certificate_key /var/app/deploy/www.thisisatest.com.key;
ssl_certificate /var/app/deploy/www.thisisatest.com.chained.crt;
# Ideally we'd have only TLSv1.2, but that compromises client support significantly