Skip to content

Instantly share code, notes, and snippets.

View bradcosine's full-sized avatar
👋

Brad Inscoe bradcosine

👋
View GitHub Profile
@bradcosine
bradcosine / add_cloudflare_ips.sh
Created December 1, 2020 23:50 — forked from dduvnjak/add_cloudflare_ips.sh
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# iterate over the lines in the downloaded file
# make sure to set `--group-id` and `--port`; more details at http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html
while read p; do aws ec2 authorize-security-group-ingress --group-id sg-e0000000 --protocol tcp --port 80 --cidr $p; done< ips-v4
@bradcosine
bradcosine / with-analytics.js.html
Created December 11, 2018 20:19 — forked from simondahla/with-analytics.js.html
Updated Instructions for Implementing Google Optimize. Where `GTM-XXXXXX` is the Optimize Container ID & where `GTM-YYYYYY` is the Google Tag Manager Container ID and where `UA-ZZZZZZZZ-Z` is the Google Analytics Property ID. Based on the latest documentation at https://support.google.com/360suite/optimize/answer/7359264
<!DOCTYPE html>
<html>
<head>
<!-- 0. UTF-8 encoding -->
<meta charset="utf-8">
<!-- 1. (OPTIONAL) Move jQuery here. -->
<!-- 2. (OPTIONAL) Datalayer -->
@bradcosine
bradcosine / .ebextensions_00_tune_ec2.config_.yaml
Created August 16, 2017 23:02 — forked from ianblenke/.ebextensions_00_tune_ec2.config_.yaml
Tuning EC2 with an ElasticBeanstalk ebextension
packages:
yum:
wget: []
curl: []
commands:
00_remove_99_swap.conf.bak:
command: rm -f /etc/sysctl.d/99_swap.conf.bak
test: test -f /etc/sysctl.d/99_swap.conf.bak
ignoreErrors: true
00_remove_99_filesystem.conf.bak: