Skip to content

Instantly share code, notes, and snippets.

View bvanderlugt's full-sized avatar
🌵

Blair Vanderlugt bvanderlugt

🌵
View GitHub Profile
import arcpy
env.workspace = "C:/SpatialProgramming/TermProject/tp.gdb"
fc = "chem"
fields = ['SCNTFC_CD', 'EST_CVR_RT', 'TRT_QTY', 'OBJECTID']
# fields = ['WELL_ID', 'WELL_TYPE', 'SHAPE@XY']
# For each row print the WELL_ID and WELL_TYPE fields, and the
# the feature's x,y coordinates
### Keybase proof
I hereby claim:
* I am bvanderlugt on github.
* I am blairv (https://keybase.io/blairv) on keybase.
* I have a public key ASAsSk_Y0C2r7J6S4Uc47m92Exqpp9dSr-MLGQx4fSmnJQo
To claim this, I am signing this object:
@bvanderlugt
bvanderlugt / gist:2d1bf094ee45fd6310a1f15551ae6f8c
Last active February 23, 2018 00:25
meta data w/ docker curl
docker run --rm appropriate/curl -fsSL http://169.254.169.254/latest/user-data
@bvanderlugt
bvanderlugt / gist:cd7a50ba5b30bbf8fcd3cfa1cf226c9a
Last active February 23, 2018 21:03
convert AWS cli profile vars to env vars
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
export AWS_DEFAULT_REGION=$(aws configure get region)
// https://docs.aws.amazon.com/cli/latest/reference/configure/index.html
# filter amis on region and name
aws ec2 describe-images --region us-west-2 --filters "Name=name,Values=rancheros-v1.1*" "Name=virtualization-type,Values=hvm" --query 'Images[*].Name'
# create key-pair and save to file
aws ec2 create-key-pair --key-name dummy --query "KeyMaterial" > dummy.pem
@bvanderlugt
bvanderlugt / linux_trix.md
Last active August 30, 2017 20:21
Linux Trix

a better way to cat things into a file, use EOF!

cat > somethang.txt <<EOF
Yo we heard you like text in your text files so we put text inside your text.
EOF

make multiple dirs

sudo mkdir -p /var/lib/{kubelet,kube-proxy,kubernetes}

brew info somedanktool

brew switch somedanktool 1.6.9

@bvanderlugt
bvanderlugt / handler.js
Created August 16, 2017 16:31 — forked from jeffrafter/handler.js
Simple HTTP Server and Router in node.js
exports.createHandler = function (method) {
return new Handler(method);
}
Handler = function(method) {
this.process = function(req, res) {
params = null;
return method.apply(this, [req, res, params]);
}
}
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('privkey.pem'),
cert: fs.readFileSync('cert.pem'),
ca: fs.readFileSync('fullchain.pem'),
requestCert: true,
}
@bvanderlugt
bvanderlugt / README.md
Created August 15, 2017 19:32
Set up letsencrypt certs manually on aws

Manually set up letsencrypt certs on AWS

Create an AWS ec2 instance. Create a route53 record. Create and elb.

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt