Skip to content

Instantly share code, notes, and snippets.

View renatamarques97's full-sized avatar

Renata Marques renatamarques97

  • Qulture.rocks
  • Teresina, PI
View GitHub Profile

Company Culture and Values:

What is the company culture like? How does the company prioritize diversity and inclusion? What are the company's core values and how are they demonstrated in day-to-day operations?

Team Dynamics:

Can you tell me about the team structure and size? How does the team collaborate and communicate on projects?

git stash list
git stash apply stash@{1}
file = File.read("article.md")
puts file.split(" ").count

pg_restore -U renatamarques -d qulture_development < ../Downloads/dump

or

psql -U renatamarques -d qulture_development < ../Downloads/dump.sql

or

./config/scripts/restore-db.bash ../Downloads/dump

asdf update or brew upgrade asdf

asdf plugin update --all

asdf install

✗ psql -U postgres
role "postgres" does not exist
✗ psql
psql: error: could not connect to server: FATAL:  database "renatamarques" does not exist
✗ createdb
✗ psql

psql (12.4)
Type "help" for help.
# Chapter 1 - Object-Oriented Design
1. The Problem Design Solves
> It is the need for change that makes design matter.
2. Why Change is Hard
> Parts interact to product behavior (objects), the interaction is made through messages passed between them.
> Object-Oriented Design is about managing dependencies.
> OOD - Set of coding techniques to arrange dependencies so objects can tolerate change.
set nocompatible " be iMproved, required
filetype off " required
set autoread
syntax on
set number
set backspace=indent,eol,start
set showcmd
set showmode
# https://www.hackerrank.com/challenges/counting-valleys/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup
# samples
path = "UDDDUDUU"
path = "UUUUUUUU"
path = "DDDDDDDD"
path = "UUUDDD"
path = "UUUUDD"
# ruby 2.7+
# https://www.hackerrank.com/challenges/sock-merchant/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup
# samples
ar = [1,2,1,2,1,3,2]
ar = [2, 4, 5, 6, 5, 2, 4, 9]
ar = [1,2,3,4,5,6]
ar = [1,1,1,1,1,1,1]
# 1
result = ar.group_by(&:itself).transform_values{ |v| v.size / 2}.values.sum