Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar

Chris Siku Chrissiku

View GitHub Profile
@Chrissiku
Chrissiku / example_one.js
Last active June 6, 2022 10:13
Is It DRY ?
View example_one.js
const pets = ['Cat', 'Dog', 'Bird', 'Fish', 'Frog', 'Hamster', 'Pig', 'Horse', 'Lion', 'Dragon'];
// Print all pets
console.log(pets[0]);
console.log(pets[1]);
console.log(pets[2]);
console.log(pets[3]);
.cat {
font-family: "Times New Roman", Times, serif;
font-size: 1rem;
View rails-api.md
View rails_exercise.rb
# Background:
#after full refactor of the provided code to make it more efficient I added comments to improve readability.
#I'll also address your questions about the 'distinct_groups' variable and what it contains.
start_range = Date.today.beginning_of_month
end_range = Date.today.end_of_month
# Fetch users with the given role efficiently using the database query.