Skip to content

Instantly share code, notes, and snippets.

@alanivey
alanivey / 00_README.md
Last active July 14, 2023 22:34
CentOS 8 AMIs for ARM64 and x86_64
{
"meta": {
"theme": "kendall"
},
"basics": {
"name": "Alan Ivey",
"label": "Senior DevOps Engineer",
"image": "https://avatars.githubusercontent.com/u/715868",
"email": "alanivey@gmail.com",
"phone": "(717) 723-8631",
@alanivey
alanivey / jail.local
Last active July 13, 2020 21:53
fail2ban filter for WordPress URLs
# Ban hosts attemping to connect to WordPress
[apache-wordpress]
enabled = true
filter = apache-wordpress
action = iptables-multiport[name=Apache-WordPress, port="http,https"]
logpath = /var/log/http/*access_log
maxretry = 3
bantime = 86400

Keybase proof

I hereby claim:

  • I am alanivey on github.
  • I am alanivey (https://keybase.io/alanivey) on keybase.
  • I have a public key ASAo6_451r0u-Bsv1FsEJXBeHnr2EwVhYF1cYi5Y8F0O6Ao

To claim this, I am signing this object:

@alanivey
alanivey / CentOS-7-GenericCloud-to-AMI.sh
Last active December 5, 2018 23:11
CentOS-7-GenericCloud-to-AMI.sh
#!/bin/bash
# Exit immediately upon a non-zero status
set -e
###############################################################################
# Pre-reqs:
# - Create service role 'vimport':
@alanivey
alanivey / install.sh
Created October 29, 2018 21:15
aws_assume_role with brew-gem
# Background: aws_assume_role 1.2.1 fails to install in brew-gem by default with an error about being unable to
# find `rake`. The following is a crude hack/workaround:
brew install brew-gem ruby
AAR_BREWGEM_TMPDIR="$( mktemp -d 2>/dev/null || mktemp -d -t 'AAR_brewgem_tmpdir' )"
brew gem formula aws_assume_role 1.2.1 --homebrew-ruby | sed -e 's/\(cached_download\)/"rake", \1/' > "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb"
HOMEBREW_NO_AUTO_UPDATE=1 brew install "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb"
@alanivey
alanivey / Homebrew.md
Last active August 18, 2018 14:59
Homebrew MAMP on OS X Mavericks
@alanivey
alanivey / kernel-devel-repos.sh
Last active March 7, 2017 15:28
kernel-devel from CentOS 7 Vault
#!/usr/bin/env bash
# /etc/yum.repos.d/CentOS-Vault.repo on a fully-updated 7.3 system contains repositories for 7.0.1406, 7.1.1503, 7.2.1511:
rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}\n' \
| xargs -I{} yum --enablerepo="C7.?.????-base" --enablerepo="C7.?.????-updates" -y install "kernel-devel-{}"
@alanivey
alanivey / NOTES.md
Last active November 30, 2016 23:12
Docker on Raspbian
@alanivey
alanivey / multi-sapi-5.3.29.patch
Created February 23, 2015 19:50
Build multiple SAPIs, back-ported to PHP 5.3
diff --git a/Makefile.global b/Makefile.global
index 3a5b1c2..7450162 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -13,6 +13,8 @@ all: $(all_targets)
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
+build-binaries: $(PHP_BINARIES)
+