Skip to content

Instantly share code, notes, and snippets.


Weston Bassler geekbass

  • Emburse
  • Columbus, Ohio
View GitHub Profile
View docker-mesos-dns
mkdir -pv mesos-dns && tee mesos-dns/config.json <<'EOF'
"zk": "zk://ZK1:2181,ZK2:2181,ZK3:2181/mesos",
"masters": ["MASTER1:5050", "MASTER2:5050", "MASTER3:5050"],
"refreshSeconds": 60,
"ttl": 60,
"domain": "",
"port": 53,
"resolvers": ["dns_ip1", "dns_ip2", "dns_ip3"],
"timeout": 5,
View docker-run-mesos-dns
sudo docker run -d --name mesos-dns -p 53:53/udp -p 8123 -v "$PWD/mesos-dns/config.json:/config.json" -v "$PWD/mesos-dns/logs:/tmp" mesosphere/mesos-dns:0.5.2 /usr/bin/mesos-dns -v=2 -config=/config.json
geekbass / mac-bash-profile
Created Oct 19, 2016
bash profile for macbook (prompt, python, spark and alias). Copy and paste to .bash_profile
View mac-bash-profile
# Add userspace python binaries to path - 2016.07.12
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/wb/Library/Python/2.7/bin
# java home
export JAVA_HOME=`/usr/libexec/java_home`
# Alias List
alias ll='ls -l'
# Bash prompt
View rexray-aws-policy
"Version": "2012-10-17",
"Statement": [
"Action": [
geekbass /
Created Oct 12, 2017
Check to see if a User exists. If so break with the check on move on.
while [ $COUNTER -lt 10 ]; do
if [ `id -u $USER 2>/dev/null || echo -1` -ge 0 ]; then
echo 'User Found... Moving on...'
geekbass /
Last active Mar 19, 2018
Get the public facing IP of a node
set -o nounset -o errexit
curl -fsSL
geekbass /
Created Mar 19, 2018
Get the main network interface of a machine. Used to ip-detect in DC/OS.
ip route get | awk '{print $7; exit}'
geekbass /
Created Apr 28, 2018
Unpack a tar ball of certs and inject into root ca for RH Distros. Awesome Team member set this up for us.
sudo curl -o /tmp/ca-certs.tar $LOCATION \
&& sudo cd /etc/pki/ca-trust/source/anchors \
&& sudo tar vfx /tmp/ca-certs.tar \
&& sudo /usr/bin/update-ca-trust extract
geekbass / dcos_agent_ami
Created May 19, 2018
Packer DC/OS Agent AMI Provisioners
View dcos_agent_ami
"provisioners": [
"type": "shell",
"remote_path": "/home/centos/",
"script": ""
"type": "ansible-local",
"playbook_file": "ansible/aws-packer.yml",
"playbook_dir": "ansible",
geekbass /
Created May 19, 2018
dcos agent setup first provisioner
set -e
# Install epel-release for later
sudo yum install -y epel-release wget curl
# Setup Python
curl "" -o ""
sudo python
sudo rm -rf