Skip to content

Instantly share code, notes, and snippets.

View juliedavila's full-sized avatar
🎃
Content

Julie Davila juliedavila

🎃
Content
View GitHub Profile
@juliedavila
juliedavila / kickstart.cfg
Created December 11, 2014 20:40
kickstart.cfg
%packages
@core
createrepo
@juliedavila
juliedavila / presentation.html
Last active August 29, 2015 14:11
presentation.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ansible Lessons Learned at NASA</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="/static/css/reveal.css">
<link rel="stylesheet" href="/static/css/default.css" id="theme">
@juliedavila
juliedavila / gist:84c0de138e545ac58914
Created January 21, 2015 14:14
Replace snmp comm string
(r[wo]community[\s]+)\S+([\s]+127.0.0.1[\s]+.1.3.6.1.2.1.1)
@juliedavila
juliedavila / openssl
Created February 4, 2015 14:24
Rough example of openssl vuln patch
---
- name: Patching Heartbleed
hosts: "{{ hosts }}"
sudo: yes
tasks:
- name: Detect if Vulnerable
command: openssl -b
register: results
ignore_errors: yes
@juliedavila
juliedavila / suconvert.py
Last active August 29, 2015 14:14
Convert sudo to su for installer
parser.add_option('--no-sudo', dest='nosudo', default=False, action='store_true')
if cli_opts.nosudo:
replacements = {
'sudo: True' : 'su: True',
'sudo: true' : 'su: True',
'sudo: yes' : 'su: True',
'sudo: no' : 'su: no',
'sudo_user: awx' : '',
'sudo_user: postgres' : '',
@juliedavila
juliedavila / env_construct.yml
Created March 16, 2015 15:51
Environment Construct Example
shell: >
cd {{ release_path }} &&
{{ item.cmd }
environment: app_env
## Where app_env is a dict like below which can reside in group_vars etc
app_env:
RAILS_ENV: SomeValue
@juliedavila
juliedavila / manage.py
Created March 22, 2015 16:51
For interactive how-to blog
# Copyright (c) 2014, Matt Makai
# All rights reserved.
# Full License can be read here: http://bit.ly/1qBgqzn
from gevent import monkey
monkey.patch_all()
import os
import redis
@juliedavila
juliedavila / config.py
Created March 22, 2015 16:53
For blog interactive pres
# Copyright (c) 2014, Matt Makai
# All rights reserved.
# Full License can be read here: http://bit.ly/1qBgqzn
import os
# General Flask app settings
DEBUG = os.environ.get('DEBUG', None)
SECRET_KEY = os.environ.get('SECRET_KEY', None)
@juliedavila
juliedavila / __init__.py
Created March 22, 2015 17:03
init file for blog on interactive prez
# Copyright (c) 2014, Matt Makai
# All rights reserved.
# Full License can be read here: http://bit.ly/1qBgqzn
from flask import Flask
from flask.ext.socketio import SocketIO
import redis
app = Flask(__name__, static_url_path='/static')
app.config.from_pyfile('config.py')
@juliedavila
juliedavila / views.py
Created March 22, 2015 17:05
views for interactive prez blog
# Copyright (c) 2014, Matt Makai
# All rights reserved.
# Full License can be read here: http://bit.ly/1qBgqzn
import cgi
from flask import render_template, abort, request
from jinja2 import TemplateNotFound
from twilio import twiml
from twilio.rest import TwilioRestClient