Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

David Norman deekayen

🏠
Working from home
Block or report user

Report or block deekayen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View blacklist.txt
googleads.g.doubleclick.net
fw.adsafeprotected.com
pagead2.googlesyndication.com
tpc.googlesyndication.com
s0.2mdn.net
cooper.logs.roku.com
austin.logs.roku.com
giga.logs.roku.com
scribe.logs.roku.com
adclick.g.doubleclick.net
@deekayen
deekayen / README.md
Last active Mar 5, 2020
Instructions on how to make various TLS certificate file outputs
View README.md
@deekayen
deekayen / prisma_alerts_jenkins.sh
Last active Mar 3, 2020
Jenkins/EL7 version of the Prisma Alerts to Splunk bridge bash script.
View prisma_alerts_jenkins.sh
#!/bin/bash
# For EL7:
# yum install curl jq
######################
# SET VALUES FOR THESE
# Prisma Cloud config
API="api2.prismacloud.io"
@deekayen
deekayen / prisma_alerts.sh
Last active Mar 3, 2020
Curl the Redlock Prism Cloud API to get alerts from last week then POST them into a Splunk HTTP event collector for alternate archival and analysis. Note the date calculation appends 3 digits of milliseconds from microtime for a total 13 digital epoch value.
View prisma_alerts.sh
#!/bin/bash
# For Mac, date is BSD based. We like GNU date parsing,
# which comes with sideloading date as a renamed gdate util.
# Use Homebrew to install some utilities: https://brew.sh
# brew install coreutils jq
######################
# SET VALUES FOR THESE
@deekayen
deekayen / .gitlab-ci.yml
Created Dec 16, 2019
Example Gitlab runner CI configuration file that would do Ansible linting and secret discovery.
View .gitlab-ci.yml
---
ansible-lint:
tags:
- ansible
script:
- ansible-lint --version
- git ls-files | grep yml | xargs ansible-lint --exclude=/home/gitlab-runner/.ansible/roles
ansible-review:
@deekayen
deekayen / smtptest.py
Created Dec 12, 2019
Written by Chris Koning as a demo python script to bootstrap a test scenario for checking ports in Molecule for the outcome of an Ansible playbook.
View smtptest.py
#!/usr/bin/env python3
from smtplib import SMTP
import http.client
print("Testing good SMTP")
try:
goodSmtp = SMTP(host="cioxhealth-com.mail.protection.outlook.com",port=25,timeout=10)
response = goodSmtp.noop()
@deekayen
deekayen / sponsor.yml
Created Dec 10, 2019
Sample block to plug my sponsor page on GitHub for placement at the end of an Ansible role task list
View sponsor.yml
---
- hosts: all
connection: local
tasks:
- debug:
msg:
- "****************************************"
- "| Sponsor deekayen to maintain this |"
@deekayen
deekayen / .gitignore
Last active Nov 28, 2019
Use Ansible to apply operating system routine maintenance and updates for CentOS and Red Hat servers. This example takes advantage of magic groups that are imported using AWS inventories in Ansible Tower for host filtering. Send extra-vars to limit the runtime by availability zone.
View .gitignore
*.keytab
*.retry
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
@deekayen
deekayen / tagging_compliance.yml
Last active Nov 21, 2019
Query AWS to find instances and volumes without Name tags using an Ansible playbook. In Ansible Tower, use a null inventory along with an AWS cloud credential. Extend this with another task to stop instances with no Name tag.
View tagging_compliance.yml
---
- hosts: 127.0.0.1
connection: local
become: no
vars:
aws_region: us-east-1
tasks:
@deekayen
deekayen / update_git.sh
Created Sep 24, 2019
Update all the git repos in a directory with the latest pull of master
View update_git.sh
#!/bin/sh
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
You can’t perform that action at this time.