Skip to content

Instantly share code, notes, and snippets.

View juliends's full-sized avatar

Julien Da Silva juliends

View GitHub Profile
require_relative "../models/employee"
require 'sqlite3'
class EmployeesRepository
def initialize
@db = SQLite3::Database.new('./food_delivery.sqlite3')
@db.results_as_hash = true
@employees = []
load_employees_from_db
end
@juliends
juliends / quizz-rails.md
Last active May 21, 2018 10:54
Quizz Rails

Quizz 4 - Rails

Q1 - How do you create a Rails app?

rails new NOM_DE_L_APP
rails new NOM_DE_L_APP --webpack
rails new NOM_DE_L_APP --database=postgres
@juliends
juliends / turbolinks.md
Created July 17, 2018 16:13
Turbolinks

Week 10 / Land your 1st dev job

You can review too!

So you want to become a junior developer Reviewing is not a CTO only privilege. What if we asked you to review this aspiring developer ?

We provide a Rails and the student has to:

  • Refactor routes
@juliends
juliends / nvm_install.md
Created September 17, 2019 13:46
move to NVM

Use NVM (node version manager) like we use rbenv for Ruby

First we will remove node and yarn

brew uninstall yarn
brew uninstall node  
brew uninstall node@8
class Car # => UpperCamelCase
# attr_reader :color, :brand
# attr_writer :color
attr_accessor :color, :brand
def initialize(color, brand) # => constructor stores the data/state
@color = color
@brand = brand
@engine_started = false # => instance variable
end
require_relative "../citizen"
describe Citizen do
describe "can vote" do
it "should return true for a major citizen" do
citizen = Citizen.new("", "", 25)
expect(citizen.can_vote?).to eq(true)
end
it "should return false for a minor citizen" do

Lead TA on Le Wagon part-time

Here is a list of guidelines you should follow during a part-time session:

1) Introduce the staff of the day for each session

This is the best way to kickstart the session and have everyone concerned and motivated.

2) You are the referrer for students

Students should know they can report any problem to you.

🎄 Garden and Plants 🎄

This is an optional exercice for the batch 301 during christmas holidays 🎅


Preparation

You need to go into your code/$USERNAME directory in which you will create your rails app.

@juliends
juliends / turbolinks.md
Created February 19, 2020 13:16
Turbolinks notes