Skip to content

Instantly share code, notes, and snippets.

View jackl0phty's full-sized avatar
💭
Automating All The Things!

Gerald Hevener jackl0phty

💭
Automating All The Things!
View GitHub Profile
@jackl0phty
jackl0phty / aws-s3-policy-minimum-privs.txt
Created November 16, 2015 23:05
How to Create an AWS S3 Bucket, tag it, Specify Region, & Enable Versioning Using Ansible.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "statement1",
"Effect": "Allow",
"Action": [
"s3:Put*",
"s3:Get*",
"s3:List*",
@jackl0phty
jackl0phty / ansible_create_ec2_instance_least_privileges
Last active October 29, 2015 22:26
Use Ansible to spin up an EC2 Instance With Least Privileges.
---
- hosts: localhost
connection: local
gather_facts: no
vars:
region: us-east-1
instance_type: t1.micro
ami: ami-d85e75b0
sg: sg-my-security-group
tasks:
@jackl0phty
jackl0phty / ansible_create_aws_sg_and_name_tag
Last active December 3, 2021 14:08
Use Ansible to create AWS Security Group, Create Name tag, Open TCP port 80, and Only Allow Access From Your Home External Ip Address.
---
- hosts: localhost
connection: local
gather_facts: no
vars:
region: us-east-1
route_prefix: /32
tasks:
- command: curl --silent --fail http://checkip.amazonaws.com/
register: external_ip
@jackl0phty
jackl0phty / Recover-Cisco-ASA-5505-Password
Created December 10, 2012 02:39
Recover Password for Cisco ASA 5505.
rommon #1> confreg
Current Configuration Register: 0x00000000
Configuration Summary:
boot ROMMON
Do you wish to change this configuration? y/n [n]: y
enable boot to ROMMON prompt? y/n [n]:
enable TFTP netboot? y/n [n]:
enable Flash boot? y/n [n]:
select specific Flash image index? y/n [n]:
disable system configuration? y/n [n]: y
@jackl0phty
jackl0phty / Perl-Print-Avery-Labels
Last active October 13, 2015 19:58
Perl script to Print Avery Labels.
#!/usr/bin/perl -w
###############################################################################
#This script will open a file containing a list of #
##addresses, use the addresses to build a postscript file, #
##and send that file to a printer. #
###############################################################################
# Licensed under the Apache License, Version 2.0 (the "License"), #
# For any questions regarding the license of this software, please refer to #
# the actual license at http://www.apache.org/licenses/LICENSE-2.0.txt. #
@jackl0phty
jackl0phty / perl-avery-labels
Created December 10, 2012 01:26
Using Perl to Print Avery Labels.
#!/bin/bash
###############################################################################
# This shell script can be used to print Avery #
# address labels. #
###############################################################################
# Licensed under the Apache License, Version 2.0 (the "License"), #
# For any questions regarding the license of this software, please refer to #
# the actual license at http://www.apache.org/licenses/LICENSE-2.0.txt. #
###############################################################################
@jackl0phty
jackl0phty / remote_cmd_with_perl
Created December 8, 2012 07:32
Using Perl to Execute Remote Commands.
#!/usr/bin/perl -w
###############################################################################
# This script is responsible for making a secure connection via SSH to #
# server1 and executing the command ls. #
# This script is also responsible for making a secure connection via SSH to #
# server1 and then SCP the file test.t #
###############################################################################
# Written by Gerald L. Hevener Jr., M.S. #
###############################################################################
# Licensed under the Apache License, Version 2.0 (the "License"), #
@jackl0phty
jackl0phty / download-java-jdk
Created October 19, 2012 18:58
Down-load Java jdk
wget --no-cookies --header "Cookie: gpw_e24=http%eA%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u37-b06/jdk-6u37-linux-x64.bin"

MU Postfix checklist

  • Group Aliases (/etc/postfix/aliases)
    • need to notify postalias, postfix reload
    • rebuild-groupaliases.pl
  • Valid Recipients (/etc/postfix/local_recipients)
    • need to notify postmap, postfix reload
    • extract_valid_recipients.pl
  • Alias mappings (script: rebuild-maps.pl; all postmap, postfix reload)