Skip to content

Instantly share code, notes, and snippets.

View muslemomar's full-sized avatar

Muslem Omar muslemomar

View GitHub Profile

Showcase your solid knowledge of HTML and CSS creating a webpage for a restaurant.

REQUIREMENTS:

  • Landing page.
  • Should include the navbar and the footer.
  • Menu Page that include categorized meals with name, price, description and image.
  • Meet our chefs section that has a list of chefs.
  • Utilize forms to a usage of your choice such as reservation/booking or feedback form.
  • Contact details section including phone number, email, and address.
Bicycle World
Welcome to Bicycle World, the premier text-based bicycle shop! This shop is only accessible to programmers like you, who are familiar with the command line.
In this project, I used the commands I learned to navigate and edit the filesystem.
The filesystem is shown below. Main directory is BicycleWorld.
BicycleWorld
|—— brands.txt
|—— freight/
@muslemomar
muslemomar / demo.js
Last active June 28, 2022 15:59
Create a fixed length array
let arr = [];
arr.maxLength = 3;
Array.prototype.pushLimited = function(elem) {
if (this.length === this.maxLength) {
throw new Error('max length exceeded');
} else {
this.push(elem);
}
}
@muslemomar
muslemomar / mongodb-embedding.md
Last active May 26, 2022 13:40
Comparison of putting author inside blogpost vs blogpost inside author

1. Embedding BlogPosts inside Author:

AuthorSchema = { blogposts: BlogPost[] }

✔ Pros:

  • Easy to query for all/specific authors.
  • Easy to update an author or delete him (including his blogposts) with a single command.
@muslemomar
muslemomar / take-home-web-project-questions.txt
Last active May 22, 2020 09:04
Take Home Web Project Questions
1) So you said that the API should not use a database and at the same time it should allow you to register users.
The only possible way is storing users in the memory, but restarting the server will reset the integers. is that ok?
2) Do the numbers have to be exact sequential (one exactly after another)?
for example if current integer is "5", if the user call "next integer" endpoint, it will return you "7" or "10" any integer larger than current one. is that ok?
3) Can the integers be large like "1590081234" ? Actually I have the idea of using timestamps 😅.
4) Should the integers be unique accross users also ? I mean can 2 users or more, share the same integer?