Skip to content

Instantly share code, notes, and snippets.

Avatar

Eduardo Poleo eduardopoleo

View GitHub Profile
View redirect_is_good.rb
Hello I'm testing this crap
View blog_app_test_local.rb
this is just content for a gist
View rails_101_test2.rb
Hello all of you!
@eduardopoleo
eduardopoleo / rails_101_test.rb
Created Jan 30, 2020
My Rails 101 gist try 2
View rails_101_test.rb
Hello all of you!
View rails_102_test.rb
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello !"
end
end
hello = HelloWorld.new("World")
View rails_101_test.rb
class HelloWorld
def initialize(name)
@name = name.capitalize
end
def sayHi
puts "Hello !"
end
end
hello = HelloWorld.new("World")
View request_faker.rb
#!/usr/bin/env ruby
require 'net/http'
url = ARGV[0]
uri = URI(url)
users = ARGV[1].to_i
$requests = 0
View aws_getting_started_pt1.md

This starts a series of posts about devops where we'll be leveraging AWS to solve some common situations that arise when running apps on the cloud. In this post we will go over a very simple set up: A web server hooked into a database for persistence. While very far from a real production situation this setup is a good starting place to learn about AWS fundamental tools. The concepts I'll be going over today include:

  • Amazon Regions
  • EC2 instance
  • AMI
  • Security Groups
  • SSH
  • Manual Dependencies installation

The Plan

View alternate_sol.rb
def recommended_experiences(experiences_limit)
experiences = current_contact
.available_experiences
.includes(challenges: :attachments)
experience_payloads = []
experiences.find_each do |experience|
payload = experience_payload(experience)
empty = payload[:total_challenge_count].zero?
View rspec_testing.rb
def add_two(a, b)
a.to_i + b.to_i
end
add_two(1, 1)
describe '#add_two' do
context 'when I add two positive numbers' do
You can’t perform that action at this time.