Skip to content

Instantly share code, notes, and snippets.

View luizfonseca's full-sized avatar
💻
cargo run

Luiz Fonseca luizfonseca

💻
cargo run
View GitHub Profile
@luizfonseca
luizfonseca / timezones_abbr.json
Last active April 29, 2021 09:03
Zoom Timezones List
{
"Pacific/Midway": "(GMT-11:00) Midway Island, Samoa",
"Pacific/Pago_Pago": "(GMT-11:00) Pago Pago",
"Pacific/Honolulu": "(GMT-10:00) Hawaii",
"America/Anchorage": "(GMT-8:00) Alaska",
"America/Juneau": "(GMT-8:00) Juneau",
"America/Vancouver": "(GMT-7:00) Vancouver",
"America/Los_Angeles": "(GMT-7:00) Pacific Time (US and Canada)",
"America/Tijuana": "(GMT-7:00) Tijuana",
"America/Phoenix": "(GMT-7:00) Arizona",
@luizfonseca
luizfonseca / cloudSettings
Last active April 16, 2020 20:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-16T20:39:04.930Z","extensionVersion":"v3.4.3"}

Keybase proof

I hereby claim:

  • I am luizfonseca on github.
  • I am luizfonseca (https://keybase.io/luizfonseca) on keybase.
  • I have a public key ASBWU8xnHZlnw6nDCKQifa-lH394H3afYKUJcP-vlKKxsgo

To claim this, I am signing this object:

@luizfonseca
luizfonseca / browser.js
Created March 22, 2018 21:27
JS Tooling > Livecode
/**
** GET https://wagon-garage-api.herokuapp.com/137/cars
** POST https://wagon-garage-api.herokuapp.com/137/cars
** body:
{
"brand": "PEUGEOT",
"model": "106",
"owner": "ssaunier",
"plate": "123AZ56"
}
@luizfonseca
luizfonseca / base_repository.rb
Last active March 7, 2018 14:21
BaseRepository example
require 'csv'
# There are a bunch of ways of doing this class
# There's not one 'best' way, but different approaches
class BaseRepository
# This is an initialize method that is
# Common for 90% of the Repositories
# It just takes a CSV file, and creates
@luizfonseca
luizfonseca / louchebem.rb
Last active January 10, 2018 23:08
Extremelly simple louchebem
def louchebemize_word(word)
return word if word.size <= 1
vowels = %w[a e i o u]
suffix = %w[em é ji oc ic uche ès].sample
index = word.chars.find_index { |v| vowels.include?(v) }
"l#{word[index..-1]}#{word[0...index]}#{suffix}"
end
@luizfonseca
luizfonseca / patient.rb
Created July 18, 2017 15:54
Patient + PatientRepository Examples for Food Delivery
class Patient
attr_accessor :room, :id
attr_reader :name, :cured
# STATES?
# - @name
# - @cured
# attr_reader :cured
def initialize(options = {})
@luizfonseca
luizfonseca / controller.rb
Last active July 17, 2017 22:35
Cookbook Day II
# Requiring it because Rake tests controllers
# individually
require_relative 'view'
require_relative 'recipe'
require_relative 'parser'
class Controller
def initialize(cookbook)
@cookbook = cookbook
@luizfonseca
luizfonseca / controller.rb
Created July 17, 2017 13:17
01 - Cookbook
# Requiring it because Rake tests controllers
# individually
require_relative 'view'
require_relative 'recipe'
class Controller
def initialize(cookbook)
@cookbook = cookbook
@view = View.new
end