Skip to content

Instantly share code, notes, and snippets.

View slacksec's full-sized avatar

Jason Huang slacksec

View GitHub Profile
@slacksec
slacksec / userdata.sh.erb
Created May 17, 2017 10:12 — forked from jbz/userdata.sh.erb
EC2 userdata.sh script to install Chef and register with Chef server
#!/bin/bash
# User data to configure a vanilla Ubuntu EC2 instance.
# Installs chef-client (with minimal dependencies),
# configures chef, and adds roles
test $UID == 0 || (echo "Error: must run as root"; exit 1)
######### STEP 1: OPERATING SYSTEM CONFIGURATION
BOOTLOG="/var/log/bootstrap.log"
@slacksec
slacksec / pedantically_commented_playbook.yml
Created January 6, 2017 21:29 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@slacksec
slacksec / droneci.json
Created September 20, 2016 13:23 — forked from dcoxall/droneci.json
Cloudformation template to deploy drone to AWS using EC2 Container Service
{
"Description": "Drone Continuous Integration (drone.io)",
"Parameters": {
"VPC": {
"Type": "AWS::EC2::VPC::Id",
"Description": "The VPC that needs provisioning"
},
"Subnets": {
"Type": "List<AWS::EC2::Subnet::Id>",
@slacksec
slacksec / cheatsheet.py
Created August 27, 2016 10:32 — forked from fuyufjh/cheatsheet.py
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)