Skip to content

Instantly share code, notes, and snippets.

View zackperdue's full-sized avatar
🛩️
Working from home

Zack Perdue zackperdue

🛩️
Working from home
  • Unicorn
  • Bali, Indonesia
View GitHub Profile
@indiesquidge
indiesquidge / subdomain-localhost-rails-5.md
Created January 19, 2016 07:42
how to access subdomains locally with Rails 5

Subdomaining Localhost with Rails 5

I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api

Rails.application.routes.draw do
  constraints subdomain: "api" do
    scope module: "api" do
@bgkittrell
bgkittrell / aws-transcode.rb
Created June 11, 2013 13:57
Uploads a directory of files to s3 and creates elastic transcoder jobs. Requires the aws-sdk gem. Usage ruby aws-transcode.rb /path/to/videos
require 'aws'
AWS.config(:access_key_id => 'XXXXX', :secret_access_key => 'XXXXX')
pipeline_id = 'XXXXXXX'
preset_id = 'XXXXXX'
s3 = AWS::S3.new
bin = s3.buckets['XXXXXX-in']
bout = s3.buckets['XXXXXX-out']