Skip to content

Instantly share code, notes, and snippets.

View rosousa's full-sized avatar

Rodolfo Sousa rosousa

  • Rio de Janeiro, Brazil
View GitHub Profile
@rosousa
rosousa / .zshrc
Created April 26, 2023 01:25 — forked from bashbunni/.zshrc
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@rosousa
rosousa / praticagroupby.sql
Created October 6, 2022 03:38
Prática - Exercícios Group By
--Q1:
SELECT COUNT("endDate") "currentExperience" FROM experiences;
--Q2:
SELECT "userId" id, COUNT(*) "educations" FROM educations GROUP BY "userId";
--Q3:
@rosousa
rosousa / praticajoin.sql
Created October 5, 2022 03:22
Prática - Exercícios Join
--Q1:
SELECT users.id, users.name, cities.name AS city FROM users JOIN cities ON users."cityId" = cities.id WHERE cities.name = 'Rio de Janeiro';
--Q2:
SELECT testimonials.id, writer.name AS writer, recipient.name AS recipient, testimonials.message FROM testimonials JOIN users AS "writer" ON testimonials."writerId" = writer.id JOIN users AS recipient ON testimonials."recipientId" = recipient.id;
--Q3: