Skip to content

Instantly share code, notes, and snippets.

View iansheridan's full-sized avatar

Ian Sheridan iansheridan

View GitHub Profile
@iansheridan
iansheridan / closures.rb
Created July 7, 2014 15:27
A demonstration of Ruby closures by Paul Cantrell
# CLOSURES IN RUBY Paul Cantrell http://innig.net
# Email: username "cantrell", domain name "pobox.com"
# I recommend executing this file, then reading it alongside its output.
#
# Alteratively, you can give yourself a sort of Ruby test by deleting all the comments,
# then trying to guess the output of the code!
# A closure is a block of code which meets three criteria:
#
@iansheridan
iansheridan / how_to_gen_ssl_cert.md
Created July 22, 2014 14:11
How to generate an SSL CSR or self signed SSL certificate

How to generate an SSL CSR or self signed SSL certificate

Overview

The following is an extremely simplified view of how SSL is implemented and what part the certificate plays in the entire process.

Normal web traffic is sent unencrypted over the Internet. That is, anyone with access to the right tools can snoop all of that traffic. Obviously, this can lead to problems, especially where security and privacy is necessary, such as in credit card data and bank transactions. The Secure Socket Layer is used to encrypt the data stream between the web server and the web client (the browser).

SSL makes use of what is known as asymmetric cryptography, commonly referred to as public key cryptography (PKI). With public key cryptography, two keys are created, one public, one private. Anything encrypted with either key can only be decrypted with its corresponding key. Thus if a message or data stream were encrypted with the server's private key, it can be decrypted only using its corresponding public key, ensuring

@iansheridan
iansheridan / outage_email_template.md
Created July 22, 2014 14:52
Outage Email Template

Subject: [Client] Outage, [app-name], [start-date-time] Priority: High

Body:

Issue

Description of issue as it is currently understood to be.

  • this should change as more is understood
@iansheridan
iansheridan / _aws_cors_sample_overview.md
Last active December 30, 2015 16:01
AWS CORS sample xml files, solution for Firefox JS/Font access issues

AWS CORS sample xml files

Overview

These are sample files of what can be done for AWS S3 bucket CORS settings

@iansheridan
iansheridan / wordpress-example.yml
Last active December 19, 2018 21:25
Sample Varnish VCL configs for Elastic Beanstalk
# Source: https://forums.aws.amazon.com/thread.jspa?messageID=482679&tstart=0#482679
packages:
yum:
varnish: []
files:
"/etc/varnish/default.vcl" :
owner: root
group: root
content: |
@iansheridan
iansheridan / status.conf
Last active August 29, 2015 14:14 — forked from dhrrgn/status.conf
server {
listen 80;
server_name localhost;
location /status {
access_log off;
default_type text/plain;
return 200 "alive";
}
}
@iansheridan
iansheridan / 01add-nginx-endpoint.config
Last active August 29, 2015 14:14
Add a Status endpoint to an Elasticbeanstalk Docker Env. Nginx config via .ebextentions
container_commands:
copy:
command: "cp .ebextensions/01update_nginx_config.py /opt/elasticbeanstalk/hooks/appdeploy/enact/"
make_exe:
command: "chmod +x /opt/elasticbeanstalk/hooks/appdeploy/enact/01update_nginx_config.py"
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = OrgAuthor: Ankit Goyal
# = Author: Ian Sheridan
#################################################################
@iansheridan
iansheridan / aws_ec2_policies.md
Last active August 24, 2017 04:03
Demystifying EC2 Resource-Level Permissions
@iansheridan
iansheridan / tmux.conf
Last active August 29, 2015 14:26 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000