Skip to content

Instantly share code, notes, and snippets.

View rianrainey's full-sized avatar

Rian Rainey rianrainey

View GitHub Profile
rianrainey / download_das.rb
Created April 3, 2018 19:37
Download DAS
View download_das.rb
#! /usr/bin/env ruby
require 'mechanize'
agent =
agent.pluggable_parser.default = Mechanize::Download
agent.get ''
episodes ='.episode > a').map { |a| a['href'] }
View .rubocop.yml
require: rubocop-rspec
#inherit_from: .rubocop_todo.yml
- bin/**/*
- db/**/*
- script/**/*
- vendor/**/*
rianrainey /
Created May 4, 2016 20:55
Keybase verification

Keybase proof

I hereby claim:

  • I am rianrainey on github.
  • I am rianrainey ( on keybase.
  • I have a public key whose fingerprint is FFE1 CB9B 7E14 89A2 B0BD 87B9 43C0 0C1B 61E1 7CCA

To claim this, I am signing this object:

rianrainey /
Last active August 29, 2015 14:26
Intro To Elixir
people = DB.find_customers 
orders = Orders.for_customers(people) 
tax = sales_tax(orders, 2013) 
filing = prepare_filing(tax)
filing = prepare_filing(sales_tax(Orders.for_customers(DB.find_customers), 2013))
rianrainey / change_url.sql
Created February 17, 2015 21:11
Update Wordpress URL in database via sql commands
View change_url.sql
UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, '','');
UPDATE wp_posts SET post_content = replace(post_content, '', '');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'','');
rianrainey /
Last active August 29, 2015 14:08
Solutions to problems encountered after upgrading to Yosemite on my development machine

Development Environment Solutions After Yosemite Upgrade

Can't start rails -s

  • I was missing minitest. By running gem install rails, it installed missing dependencies and thus fixed the minitest error. reference

  • Can't initialize': could not connect to server: Connection refused (PG::Error) reference

cd /usr/local/var/postgres
mkdir pg_tblspc pg_twophase pg_stat_tmp
rianrainey /
Created October 14, 2014 14:06
Set up Amazon S3 for Paperclip on Heroku
# Amazon S3 settings for Paperclip uploads
  config.paperclip_defaults = {
    :storage => :s3,
    :s3_protocol => 'https',
    :s3_credentials => {
    :bucket => ENV['AWS_BUCKET'],
    :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
    :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
View spotify.scpt
if application "Spotify" is running then
tell application "Spotify" to playpause
else if application "iTunes" is running then
tell application "iTunes" to playpause
end if
if application "Spotify" is running then
tell application "Spotify" to next track
else if application "iTunes" is running then
tell application "iTunes" to next track
rianrainey / submission.txt
Created August 28, 2014 19:17 example submission
View submission.txt
Host Name:
AWS Key: 0123
AWS Secret Key: 3210
Bucket Name:
Optional AWS S3 endpoint: I left it as the default of ‘s3’
Optional syslog UDP end-point: I left it as the default of ‘`.
rianrainey / user-policy.json
Created August 28, 2014 19:05
AWS IAM User Policy for S3Auth
View user-policy.json
{ "Statement": [
{ "Effect": "Allow",
"Action": ["s3:GetObject", "s3:GetBucketWebsite"],
"Resource": [ "*" ]