View minimum_rights_policy.json
{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket" ],
"Resource": [ "arn:aws:s3:::BUCKETNAME" ]
},
{
"Effect": "Allow",
"Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:PutObjectAcl"],
View freelance-roundtable-1.md

The Monthly Freelance Roundtable #1

Hello!

My name is Ernesto and I've been a member of Indy Hall since September '16. During this time I've read and heard really interesting ideas and discussions about freelancing. Technically I'm not a freelancer right now, but a few years ago I turned my freelancing career into a small software development shop. You can read a bit more about me over here.

In the spirit of JFDI, I think there is enough interest to start a monthly roundtable for freelancers where we could discuss all things freelance: problems, solutions, ideas, best practices, tips, etc!

The goal is to share advice based on our own experience. If you're interested, just join our meeting, listen to each other, and suggest solutions based on what's worked best in the past.

View gist:4385cf7e70ec7a03e1fe2a0314f52f2a
64 bytes from 216.58.217.142: icmp_seq=9 ttl=53 time=338.567 ms
64 bytes from 216.58.217.142: icmp_seq=10 ttl=53 time=322.274 ms
64 bytes from 216.58.217.142: icmp_seq=11 ttl=53 time=126.302 ms
64 bytes from 216.58.217.142: icmp_seq=12 ttl=53 time=168.253 ms
64 bytes from 216.58.217.142: icmp_seq=13 ttl=53 time=35.626 ms
64 bytes from 216.58.217.142: icmp_seq=14 ttl=53 time=84.729 ms
64 bytes from 216.58.217.142: icmp_seq=15 ttl=53 time=409.794 ms
64 bytes from 216.58.217.142: icmp_seq=16 ttl=53 time=175.656 ms
64 bytes from 216.58.217.142: icmp_seq=17 ttl=53 time=58.228 ms
64 bytes from 216.58.217.142: icmp_seq=18 ttl=53 time=72.543 ms
View bin-setup
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
View highlight.sh
highlight -O rtf 03.with_multiple_orms.rb --font-size 24 --font Inconsolata --style zenburn -W -J 80 -j 3 --src-lang ruby | pbcopy
View gist:0b9f6c477812817725741da212f571a0
Devise.setup do |config|
config.mailer_sender = ENV['EMAIL_FROM']
require 'devise/orm/active_record'
config.case_insensitive_keys = [:email]
config.strip_whitespace_keys = [:email]
config.skip_session_storage = [:http_auth]
config.stretches = Rails.env.test? ? 1 : 11
config.pepper = ENV['PASSWORD_PEPPER']
View null_seller.rb
# Only the sysadmin will have this type of {Seller}
class NullSeller < Seller
def active?
true
end
def activated?(key)
true
end
View null_object.rb
class Seller
belongs_to :user
def can_add_products?
products.count < seller.products_limit
end
def seller
if is_sysadmin?
NullSeller.new
View check_payments.rb
class PaymentGateway::MangoGateway < PaymentGateway
# Checks for payments
def check_payments
begin
payments = Mango::Charges.list(secret_api_key)
if payments.any?
logger.info "payments: #{payments.inspect}"
logger.info "[Mango] Payment Found! "
# ...
end
View talk.rb
class Animal
attr_accessible :kind
def talk
fail "I don't know how to talk! "
end
end
class Cat < Animal
def talk