Skip to content

Instantly share code, notes, and snippets.

View ryanjones's full-sized avatar

Ryan Jones ryanjones

View GitHub Profile
@ryanjones
ryanjones / cognito.yaml
Created October 29, 2018 01:34 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@ryanjones
ryanjones / gist:68ec194f015a2114fa01f86ef1e3e46a
Created August 25, 2018 03:01 — forked from mingderwang/gist:10963621
install s3cmd on mac os x
download tarball (http://s3tools.org/download)
$ sudo python setup.py install
$ s3cmd --configure
Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.
Access key and Secret key are your identifiers for Amazon S3
# Description:
# Automates aspects of mover.io's current Github workflow which leverages
# Github's issue tags and commenting system. We previously used a :+1:
# comment to approve pull requests, but doing so did not affect the state of
# the the PR.
#
# Included is a Github webhook handler that checks for comments containing
# certain trigger words. Currently:
#
# :+1: The pull request is approved.

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
God.watch do |w|
w.name = 'remote_syslog'
w.interval = 7.seconds
w.log = File.join(RAILS_ROOT, 'log', "#{w.name}-god.log")
w.dir = RAILS_ROOT
w.start = "bundle exec remote_syslog --tls -D -c #{RAILS_ROOT}/config/remote_syslog.yml"
@ryanjones
ryanjones / LICENSE
Created September 6, 2012 17:12 — forked from nathany/LICENSE
Pruning remote branches that are already in master
Copyright (C) 2012 Nathan Youngman
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@ryanjones
ryanjones / README.md
Created February 17, 2012 17:04 — forked from fnichol/README.md
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)