Skip to content

Instantly share code, notes, and snippets.

@whelmed
whelmed / bootstrap.sh
Created July 14, 2019 20:49
Cross-region GCP Web App Test
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get install apache2 -y
sudo a2ensite default-ssl
sudo a2enmod ssl
sudo service apache2 restart
@whelmed
whelmed / iot_core_test.sh
Created July 13, 2019 23:03
Cloud IoT Core Test
#!/bin/bash
set -e
REGISTRY_ID=YOUR_ID_HERE
REGION=us-YOUR_REGION_HERE
PROJECT_ID=YOUR_PROJECT_HERE
DEVICE_ID=YOUR_DEVICE_ID_HERE
echo "Creating RSA Key for device authentication"
@whelmed
whelmed / andor.py
Created April 3, 2018 18:37
CloudSearch PoC
#!/bin/python
''' Target: python 3.6
This is a very simplistic CloudSearch query builder.
The intent is that this will ensure values are encoded and have a valid syntax.
Combine and nest the operators along with a query type, a field, or fields, or a value:
Query types: Term, Matchall, Prefix, Phrase, Near, and Range.
Operators: And, Or, Not
Conditionals: If
@whelmed
whelmed / lamp_demo_final.yaml
Created November 7, 2016 19:08
The final result of our LAMP demo
---
- hosts: all
gather_facts: false
connection: local
become: yes
vars:
packages:
- apache2
- mysql-server
@whelmed
whelmed / lamp_demo_1.yaml
Created November 7, 2016 18:30
Our first playbook
---
- hosts: all
gather_facts: false
connection: local
become: yes
tasks:
- name: Install our packages
apt:
name: "{{ item }}"