Skip to content

Instantly share code, notes, and snippets.

View deekayen's full-sized avatar
🏡
Working from home

David Norman deekayen

🏡
Working from home
View GitHub Profile
@deekayen
deekayen / saml-list-all.sh
Last active November 9, 2020 17:22
List all services used in AWS with aws-list-all python pip package.
#!/bin/zsh
saml2aws exec 'aws-list-all query --parallel 1 --region us-east-1 | grep "+++" | cut -d" " -f2 | sort | uniq'
@deekayen
deekayen / .gitlab-ci.yml
Created October 22, 2020 02:34
Lint Ansible using GitLab Runners in kubernetes.
---
default:
image:
name: cytopia/ansible:latest-tools
entrypoint: ["/bin/sh", "-c"]
tags:
- kubernetes
ansible-lint:
@deekayen
deekayen / .gitlab-ci.yml
Created August 3, 2020 21:22
Build a Docker container and then scan it with Aquasec Trivy in GitLab CI. Fail for HIGH and CRITICAL findings.
trivy:
tags:
- kubernetes
stage: test
image: docker:stable
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
@deekayen
deekayen / Preferences.sublime-settings
Created August 3, 2020 15:07
Sublime Text settings for dnorman-macbook
{
"color_scheme": "Packages/Theme - Monokai Pro/Monokai Pro (Filter Spectrum).sublime-color-scheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_face": "Source Code Pro",
"font_size": 16,
"ignored_packages":
[
"Vintage"
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 March 5, 2020 18:10
Instructions on how to make various TLS certificate file outputs
@deekayen
deekayen / prisma_alerts.sh
Last active March 3, 2020 18:25
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.
#!/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 / prisma_alerts_jenkins.sh
Last active March 3, 2020 18:20
Jenkins/EL7 version of the Prisma Alerts to Splunk bridge bash script.
#!/bin/bash
# For EL7:
# yum install curl jq
######################
# SET VALUES FOR THESE
# Prisma Cloud config
API="api2.prismacloud.io"
@deekayen
deekayen / buffalo.cow
Last active January 8, 2020 19:03
Buffalo animal for cowsay
##
## Buffalo
##
$the_cow = <<EOC;
$thoughts
$thoughts _.-````'-,_
_,.,_ ,-'` `'-.,_
/) ( '``-.
(( ) ) `\\
\\) (_/ )\\
@deekayen
deekayen / .gitlab-ci.yml
Created December 16, 2019 21:25
Example Gitlab runner CI configuration file that would do Ansible linting and secret discovery.
---
ansible-lint:
tags:
- ansible
script:
- ansible-lint --version
- git ls-files | grep yml | xargs ansible-lint --exclude=/home/gitlab-runner/.ansible/roles
ansible-review: