Skip to content

Instantly share code, notes, and snippets.

@lalit790
lalit790 / lambdaAMIBackups.py
Created June 8, 2019 14:35 — forked from bkozora/lambdaAMIBackups.py
AWS Lambda AMI Backups
# Automated AMI Backups
#
# @author Robert Kozora <[email protected]>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and create an AMI of it. Also, it will look for a "Retention" tag key which
# will be used as a retention policy number in days. If there is no tag with
# that name, it will use a 7 days default value for each AMI.
#
@lalit790
lalit790 / ansible_nested.yml
Created April 26, 2019 08:15 — forked from filipenf/ansible_nested.yml
Ansible with_nested example
---
- hosts: localhost
connection: local
vars:
all_networks:
- 10.80.128.0/20
- 10.80.144.0/20
- 10.80.208.0/20
- 10.10.5.0/24
@lalit790
lalit790 / simple_sign_in_and_sign_out.py
Created November 11, 2018 13:43 — forked from daGrevis/simple_sign_in_and_sign_out.py
Simple sign in and sign out in Python's Flask
from flask import Flask, session, escape, request, redirect, url_for
from os import urandom
app = Flask(__name__)
app.debug = True
app.secret_key = urandom(24)
@app.route('/')