Skip to content

Instantly share code, notes, and snippets.

@alanivey
alanivey / 00_README.md
Last active February 23, 2023 14:47
CentOS 8 AMIs for ARM64 and x86_64
View 00_README.md
@alanivey
alanivey / jail.local
Last active July 13, 2020 21:53
fail2ban filter for WordPress URLs
View jail.local
# 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
View keybase.md

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
View 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
View install.sh
# 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
View Homebrew.md
@alanivey
alanivey / kernel-devel-repos.sh
Last active March 7, 2017 15:28
kernel-devel from CentOS 7 Vault
View kernel-devel-repos.sh
#!/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
View NOTES.md
@alanivey
alanivey / multi-sapi-5.3.29.patch
Created February 23, 2015 19:50
Build multiple SAPIs, back-ported to PHP 5.3
View multi-sapi-5.3.29.patch
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)
+
@alanivey
alanivey / shuttle_config.sh
Created December 10, 2013 18:46
Shuttle (http://fitztrev.github.io/shuttle/) config with Vagrant, all Storm on Demand (stormondemand.com) servers, and all Liquid Web servers
View shuttle_config.sh
#!/bin/bash
echo "{"
echo "\"_comment\": \"Valid terminals include: 'Terminal.app' or 'iTerm'\","
echo "\"terminal\": \"iTerm\","
echo "\"hosts\": ["
echo "{"
echo "\"name\": \"Vagrant\","