This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BinaryTree | |
def initialize | |
@root = nil | |
@left_nodes = [] | |
@right_nodes = [] | |
end | |
def insert(value) | |
@root.nil? ? @root = TreeNode.new(value) : @root.insert(value) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ nitro-web git:(master) ✗ rails s | |
[DEPRECATED] Your lockfile contains a single rubygems source section with multiple remotes, which is insecure. You should run `bundle update` or generate your lockfile from scratch. | |
WARNING DEPARTURE IS DISABLED!!! | |
=> Booting Puma | |
=> Rails 5.2.4.5 application starting in development | |
=> Run `rails server -h` for more startup options | |
Exiting | |
Traceback (most recent call last): | |
51: from bin/rails:4:in `<main>' | |
50: from bin/rails:4:in `require' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# O Desafio | |
Escrever um aplicação Rails API onde usuários poderão agendar sessões com os especialistas cadastrados. | |
## Modelos | |
1. Profissional (Specialist) | |
2. Paciente (Patient) | |
3. Agendamento (Booking) | |
## Endpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### O Desafio | |
Escrever um código em Ruby para subir imagens gif, onde visitantes poderão ver e procurar por gifs. | |
## Requisitos | |
1. Como usuário, eu quero fazer upload de uma imagem no formato `.gif`, com um limite de 10mb por arquivo. | |
2. Como usuário, quero poder ver um GIF que enviei | |
3. Como usuário, eu quero marcar os gifs com uma ou mais tags. | |
4. Como visitante, eu quero fazer login com o Twitter e me tornar usuário. | |
5. Como visitante, eu quero ver todos os gifs marcados com uma tag específica. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/activestorage_extensions.rb | |
# frozen_string_literal: true | |
module NitroAttached | |
def service_url | |
# url: user.avatar.url, | |
# filename: filename | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
Scanner leia = new Scanner(System.in); | |
Fila fila = new Fila(20); | |
Fila f1 = new Fila(3); | |
int opcao = 0; | |
while(opcao != 4) { | |
menu(); | |
opcao = leia.nextInt(); | |
switch(opcao) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SIMPLE_CRM_URL = 'https://my-simple-crm.herokuapp.com'; | |
const USERNAME = 'cleiviane'; | |
const PASSWORD = '12345678'; | |
(function ($) { | |
var ready = $.fn.ready; | |
$.fn.ready = function (fn) { | |
addUserTrack(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :backup do | |
[:development, :production].each do |env| | |
namespace env do | |
desc 'Faz o dump de uma base informada como parametro' | |
task :dump_database_collections => :environment do | |
Mongoid.load! File.join(Rails.root, "config/mongoid.yml"), env | |
database_name = ENV['db'] | |
dump_dir = File.join(ENV['output'], database_name) |