This is a Ruby on Rails application that helps users with benefits applications. The application uses:
- Ruby on Rails 8
- PostgreSQL database
- Bootstrap 5.3 for UI styling
- Hotwire (Turbo and Stimulus) for frontend interactivity
- RSpec for testing
A meta é criarmos uma página simples, que consuma a API do GitHub e nos deixe criar anotações para cada perfil que escolhermos.
A aplicação deve ter um campo de busca onde será inserido o username, e ao pesquisar, o app deve mostrar o perfil completo do usuário com sua lista de repositórios.
O app também deve permitir que o usuário possa listar, adicionar, editar e remover notas (comentários) para cada usuário listado, utilizando a API do Firebase para armazenamento em realtime.
| After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work. | |
| The error was something like "database files are incompatible with server". | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default | |
| brew unlink postgresql | |
| brew install postgresql95 | |
| brew unlink postgresql95 | |
| brew link postgresql |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.
| require 'omniauth-oauth2' | |
| # this OmniAuth-Strategy uses the Keyrock Identity Management | |
| # see http://catalogue.fiware.org/enablers/identity-management-keyrock | |
| # The server url is from the public FIWARE Lab instance. | |
| module OmniAuth | |
| module Strategies | |
| class FilabStrategy < OmniAuth::Strategies::OAuth2 | |
| option :name, "filab" | |
| option :client_options, { |
| require 'rubygems' | |
| require 'aws-sdk' | |
| # This code snippet sends a push notification to a device using the Amazon SNS service. | |
| # | |
| # It is using the preview V2 amazon gem as per: | |
| # https://aws.amazon.com/sdk-for-ruby/ | |
| # | |
| # This was installed using: | |
| # $ gem install aws-sdk --pre |
| --- | |
| - :cod_uf: '52' | |
| :uf: Goiás | |
| :city_id: '00050' | |
| :city: Abadia de Goiás | |
| :sigla_uf: GO | |
| :city_code: '5200050' | |
| - :cod_uf: '31' | |
| :uf: Minas Gerais | |
| :city_id: '00104' |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)| sum = ->(num_list) { num_list.reduce(:+) } | |
| square = ->(number ) { number * number } | |
| squares = ->(num_list) { num_list.map {|num| square.(num) } } | |
| sum_squares = ->(num_list) { sum.(squares.(num_list)) } | |
| square_sum = ->(num_list) { square.(sum.(num_list)) } | |
| gem 'minitest' | |
| require 'minitest/autorun' | |
| describe "sum_squares" do |