Skip to content

Instantly share code, notes, and snippets.

View liliumorion's full-sized avatar

Hadia Djadallah liliumorion

  • 09:25 (UTC +02:00)
View GitHub Profile

Questions: Frontend File Setup

Answer the following questions with your group:

  • How do you link a JavaScript file to an HTML document?
  • How do you link a CSS file to an HTML document?
  • What are the roles of HTML, CSS, and JavaScript on a webpage?
  • What is the DOM? How is it related to HTML, CSS, and JavaScript?
  • How does HTML get rendered into DOM?
  • What are elements?

Scopes Discussion

1. What is the scope of variable GLOBAL_DATA in the example below:

<script>
  let GLOBAL_DATA = { value : 1};
</script>
@ihollander
ihollander / VSCode-live-server-setup.md
Last active July 13, 2024 17:46
Setup instructions for Live Server in VSCode (how to prevent issues working with json-server)

Problem Statement

Live Server is a great tool for working with Javscript. It automatically reloads our code any time changes are made to files in the folder where Live Server is running. This becomes an issue when using a tool like json-server with a .json file in the same directory - since changes you make using POST/PATCH/DELETE requests will update the .json file, these changes will also cause your app to reload.

Solution

You can solve this by telling Live Server to ignore changes to certain files. Open your VSCode preferences by pressing command + shift + p in VSCode and searching for "Preferences: Open Settings (JSON)". Then, add the following lines to the settings.json file:

"liveServer.settings.ignoreFiles": [
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active July 14, 2024 18:01
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@augbog
augbog / Free O'Reilly Books.md
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@vivanov1410
vivanov1410 / .bash_profile
Created December 6, 2012 08:30
bash settings
COL_BLACK=$'\[\033[30m\]'
COL_RED=$'\[\033[31m\]'
COL_GREEN='\[\033[32m\]'
COL_YELLOW_ORANGE=$'\[\033[33m\]'
COL_BLUE=$'\[\033[34m\]'
COL_MAGENTA=$'\[\033[35m\]'
COL_CYAN=$'\[\033[36m\]'
COL_NORM=$'\[\033[39m\]'
PMPT_BOLD=$'\[\033[1m\]'
PMPT_NORM=$'\[\033[0m\]'