Skip to content

Instantly share code, notes, and snippets.

View iansheridan's full-sized avatar

Ian Sheridan iansheridan

View GitHub Profile
@iansheridan
iansheridan / api.feature
Created July 20, 2011 11:59 — forked from adamstrickland/api.feature
Cucumber Example for testing a RESTful API
Scenario: Get List of My Hitchhiking Items via API
Given the existing things:
|name|
|The Guide (duh)|
|A towel|
|Sub-Etha Sens-O-Matic|
|Pan Galactic Gargle Blaster|
|Kill-o-Zap blaster pistol|
And the existing accounts:
|email|name|password|
@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 / git-cheat-sheet.md
Created March 15, 2011 14:25
A cheat sheet for GIT

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

@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 / save_fingers.sh
Created September 12, 2013 22:30
pre-populate known_hosts file for known ssh access points such as github.com
# HOST == access URI (eg. github.com)
ssh-keyscan -t rsa,dsa HOST 2>&1 | sort -u - ~/.ssh/known_hosts > ~/.ssh/tmp_hosts
cat ~/.ssh/tmp_hosts >> ~/.ssh/known_hosts
// screep astar
// based off of javascript-astar 0.4.1
// http://github.com/bgrins/javascript-astar
// Freely distributable under the MIT License.
// Implements the astar search algorithm in javascript using a Binary Heap.
// Includes Binary Heap (with modifications) from Marijn Haverbeke.
// http://eloquentjavascript.net/appendix2.html
// Modified for Screeps by Robert Hafner
@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 / about.md
Last active May 11, 2018 20:36
Faction, Order of the Rising Sun

Monastery

The Monastery of the Rising Sun

Sàben created the monastery for several reasons. To honor his Guiding Angel Sariel. To start training Monks. As a safe haven for those seeking peace through redemption . And to be a source of revenue for a Faction.

Faction

Name

@iansheridan
iansheridan / Roll20 Mystara Calendar
Last active November 16, 2017 23:13 — forked from shdwjk/Roll20 Mystara Calendar
My first release of a Mystara Calendar API Script for Roll20.
var Calendar = Calendar || {
version: '0.0.1',
lunarPhaseSize: 15,
lunarPhasesImage: 'https://s3.amazonaws.com/files.d20.io/images/4277527/CJJWBbiHx3jHglPdccPx3A/max.png?1401939451',
clearImage: 'https://s3.amazonaws.com/files.d20.io/images/4277467/iQYjFOsYC5JsuOPUCI9RGA/max.png?1401938659',
_Ordinal: function(num) {
var ones=(num%10);
var tens=((num%100)-ones);
switch(ones)
@iansheridan
iansheridan / aws_ec2_policies.md
Last active August 24, 2017 04:03
Demystifying EC2 Resource-Level Permissions