Skip to content

Instantly share code, notes, and snippets.

View SalahHamza's full-sized avatar

Hamza SalahHamza

View GitHub Profile
@SalahHamza
SalahHamza / javascript_testing.md
Last active October 4, 2018 03:51
Javascript Unit Testing Notes

Javascript Testing

Testing is just validating an expectation about something

Unit Tests, test parts of an application or "units".A unit can be a function, an object, a module, basically everything self-contained that acts like a black box to the outside world. Very commonly, each units is tested individually and independently to ensure an application is running as expected.

Intro To Jasmine

Suites

@SalahHamza
SalahHamza / web_tooling_and_automation.md
Last active September 28, 2018 18:54
Web tooling and automation notes

Web Tooling and Automation

Common sense

When it comes to web tools, there are some scenarios that set you up for failure that should be avoided

  • Avoid the idea that you can build a better tool from scratch, chances are you can't but even if you could it won't be worth it.
  • Avoid diving into a new built tool because it's (let's say) X% faster. That X% is good and all, but a tool that is well supported by the community is pragmatic.
  • Avoid self contained tools that don't offer connection points.
  • Avoid, optimization that are not worth it, for example an opitimizaion that takes 4hours and it only cuts 1 second from a task you perform once in a day, you need to do it for 40 years to justify the investment.
@SalahHamza
SalahHamza / es2015.md
Last active September 10, 2018 00:52
Notes for ES2015+

ES2015+ syntax

Let and Const

Overview

When declaring a variable with the keyword var, the variable’s declaration gets hoisted. What does that mean?

Let’s say we declared a function like this:

@SalahHamza
SalahHamza / ajax.md
Last active September 8, 2018 22:00
AJAX course notes

AJAX

AJAX or Asynchronous Javascript and XML allows for content retrieval and display without reloading the web page. The concept is to send that the client sends the request and while waiting it can do other tasks but once the response returns we can do whatever we want with the it, well, according to the pre-set instructions that we set before dubbed callbacks.

Things to know before diving into AJAX

Web APIs

API is an acronym for Application Programming Interface. We'll be using APIs to interact with various data sources.

@SalahHamza
SalahHamza / install_ngrok.md
Last active April 25, 2024 16:05
How to install ngrok on linux subsystem for windows
@SalahHamza
SalahHamza / service_workers.md
Last active August 12, 2018 08:53
Service Workers Notes

Intro To Service Workers

Service Worker is a programmable network proxy, allowing you to control how network requests from your page are handled. Service Workers require HTTPs on the page (The only exception is when working locally).

Note: If there is information that you need to persist and reuse across restarts, service workers do have access to the IndexDB API.

Registering a Service Worker

How to register a service worker

@SalahHamza
SalahHamza / todos.md
Last active January 21, 2019 15:43
Things to finish up and/or things to start learning

Things To Do/learn

In project

Todo Status
Add page title Done ✔
Add Table of content Done ✔
Switch to jekyll Not Done
Inline CSS Not Done
@SalahHamza
SalahHamza / web_accessibility.md
Last active August 25, 2018 22:58
Web Accessibility Notes

Web Accessibility

Overview

What is Accessibility

Broadly speaking, when we say a site is accessible, we mean that the site's content is available, and its functionality can be operated, by literally anyone.

and it also

@SalahHamza
SalahHamza / responsive_tables.md
Last active July 26, 2018 18:03
Responsive Tables

Responsive Tables

Hidden Columns

The concept here is to hide columns based on their importance as the viewport gets smaller. This can be done by applying a display: none on the columns you want to hide at a certain breakpoint.

The bad thing about hidden columns technique is that the hidden columns are not seen by search engines or screen readers.

No More Tables

With the no more tables technique, below a certain viewport width, the table is collapsed and resembles a long list, as opposed to a table data.