Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/salt.list
apt-get update
apt-get install salt-minion
#!/bin/bash
wget -O - https://repo.saltstack.com/apt/ubuntu/12.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb http://repo.saltstack.com/apt/ubuntu/12.04/amd64/latest precise main" > /etc/apt/sources.list.d/salt.list
apt-get update
apt-get install salt-minion
@hernanc
hernanc / dash-sniffer-2.0.py
Created April 6, 2017 02:54
Amazon Dash button MAC adress detector 2.0-ish
#!/usr/bin/env python3
# Based on Ted Bensons' script to identify Amazon Dash buttons hardware MAC addresses
# Original post:
# https://blog.cloudstitch.com/how-i-hacked-amazon-s-5-wifi-button-to-track-baby-data-794214b0bdd8
# Since then, it seems Amazon updated the buttons to behave differently -or the script in the blog had an error.
# IMPORTANT: Read the comments!!!
from scapy.all import *
@hernanc
hernanc / S3-Static-Sites.md
Created February 9, 2018 21:26 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@hernanc
hernanc / local-mongodb-replica-set.md
Created December 30, 2019 19:24
Local MongoDB Replica Set

Local MongoDB

The best way to install MongoDB locally is using Brew:

brew install mongodb

The config is located in /usr/local/etc/mongod.conf

#!/bin/bash
ls -lha ~/Library/Keychains/login.keychain