Skip to content

Instantly share code, notes, and snippets.

View rrichards's full-sized avatar
💭
Rocking the CLI

Ryan Richards rrichards

💭
Rocking the CLI
  • R3 Technologies, Inc.
  • Oklahoma City, OK
  • X @rrichards
View GitHub Profile
@rrichards
rrichards / README.md
Created March 26, 2020 20:58 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


server {
listen 80;
listen 443 ssl;
proxy_set_header X_FORWARDED_PROTO https;
ssl_certificate /etc/nginx/certificate.crt;
ssl_certificate_key /etc/nginx/certificate.key;
server_name XXXXXXXXXXXXXXXXXXX;
@rrichards
rrichards / grafana custom.ini
Created February 20, 2020 09:34 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@rrichards
rrichards / ami-clean.sh
Created January 14, 2020 17:28 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu EC2 instance before packaging as an AMI
#!/bin/bash
# This script cleans up your EC2 instance before baking a new AMI.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5921369/raw/ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@rrichards
rrichards / ami-clean.sh
Created January 14, 2020 17:28 — forked from garlandkr/ami-clean.sh
Clean-up an Amazon EC2 instance before creating an AMI
#!/bin/bash
# Run this script with:
# bash <(curl -s https://gist.github.com/garlandkr/e80674b49270b0199fa6/raw/ami-clean.sh
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean Yum'
@rrichards
rrichards / puma.rb
Created December 19, 2019 21:35 — forked from danielalvarenga/puma.rb
Puma config for rails 5 api
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
# More: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#threads
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
@rrichards
rrichards / puma.rb
Created December 19, 2019 21:35 — forked from danielalvarenga/puma.rb
Puma config for rails 5 api
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
# More: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#threads
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
@rrichards
rrichards / gist:5b2a4a942f9e77b73f7efe77a7afa1ce
Created October 30, 2019 10:22 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@rrichards
rrichards / grab links.bookmarklet
Created August 2, 2019 07:24 — forked from ttscoff/grab links.bookmarklet
Create a bookmark and paste the code from `grab links.bookmarklet` into the url. Trigger it on a page containing links you want to save and then click the section of the page containing the links. A Markdown list of all links will be generated, and clicking the resulting list will select all for copying.