|
153 | | Public cloud | No local hardware, all running on cloud provider's hardware |
High scalability/agility
Pay-as-you-go pricing
Not responsible for maintenance and updates of the hardware
Minimal technical knowledge required
|
May be security requirement that can't be met
May be government policies, industry standards or legal requirements that can't be met
Can't manage hardware in the way you want to
May not work with legacy applications
|
154 | | Hybrid Cloud | Combining public and private clouds |
Keep any legacy systems running
Flexibility to choose where things run
Get economies of scale from public cloud where available
Meet more compliance
Run things where it is most appropriate
| Increased cost and complexity |
155 |
156 | # Types of cloud services
157 |
158 | ## IaaS
159 |
160 | Most flexible category; gives control over hardware.
161 |
162 | Commonly used for:
163 |
164 | - Migrating workflows
165 |
166 | - Test and development
167 |
168 | - Storage, backup and recovery
169 |
170 | **Shared responsibility model** - Cloud provider ensures infrastructure
171 | is working correctly, customer makes sure the service they are using is
172 | configured correctly, is up to date and is available to users.
173 |
174 | ## PaaS
175 |
176 | Provides an environment for building, testing and deploying software
177 | applications. Don’t have to manage infrastructure.
178 | Commonly used for:
179 |
180 | - Development framework
181 |
182 | - Analytics or business intelligence
183 |
184 | ## SaaS
185 |
186 | Only responsible for data+access
187 |
188 | Access in Azure via marketplace
189 |
190 | Pay-as-you-go pricing
191 |
192 | Users pay for software they use on a subscription model
193 |
194 | ## Cost and Ownership
195 |
196 | | | IaaS | PaaS | SaaS |
197 | | ------------------------ | -------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------------- |
198 | | Upfront costs | None, pay for consumption | None, pay for consumption | None, pay subscription |
199 | | User ownership | User responsible for software, OS, middleware and applications | User responsible for development of applications | Users just use software |
200 | | Cloud provider ownership | Infrastructure is available to user | OS, Network and service | Provision, management and maintenance of application software. |
201 |
202 | 
203 |
--------------------------------------------------------------------------------
/notes/Certifications/AZ900/Resource_Manager.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Control and organize Azure resources with Azure Resource Manager
3 | ---
4 |
5 | # Principles of resource groups
6 |
7 |
8 | A logical container for resources deployed on Azure
9 |
10 |
11 | All resources must be in a resource group and a resource can only be a
12 | member of a single resource group.
13 |
14 | If you delete a resource group, all resources container within are also
15 | deleted.
16 |
17 | Resource groups are a scope for applying RBAC to limit access to allow
18 | only what is needed
19 |
20 | # Using tagging to organise resources
21 |
22 |
23 | Name/value pairs of text data that you can apply to resources and resource groups
24 |
25 |
26 | A resource can have up to 50 tags
27 |
28 | Tags can be used to group billing data or to keep track of usage for
29 | different projects
30 |
31 | Not all resources support tags, so you need to check if your resource
32 | supports them
33 |
34 | # Resource locks
35 |
36 |
37 | A setting that can be applied to any resource to block modification or deletion
38 |
39 |
40 | Resource locks can be either:
41 |
42 | - Delete - Allow all operations against the resource but block the
43 | ability to delete it
44 |
45 | - Read-only - Only allow read activities to be performed against it,
46 | blocking any modification or deletion of the resource
47 |
--------------------------------------------------------------------------------
/notes/Certifications/AZ900/Security.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Security, responsibility and trust in Azure
3 | ---
4 |
5 | # Shared responsibility of cloud security
6 |
7 | 
8 |
9 | Regardless of the deployment type, you always retain responsibility for:
10 |
11 | - Data
12 |
13 | - Endpoints
14 |
15 | - Accounts
16 |
17 | - Access Management
18 |
19 | ## Layered approach to security
20 |
21 | ### Data
22 |
23 | It is the responsibility of those storing and controlling access to the
24 | data to ensure that it’s properly secured. There are often regulatory
25 | requirements for the CIA of this data
26 |
27 | ### Application
28 |
29 | - Ensure applications are secure and free of vulnerabilities
30 |
31 | - Store sensitive application secrets in a secure storage medium
32 |
33 | - Make security a design requirement for all application development
34 |
35 | ### Compute
36 |
37 | - Secure access to virtual machines
38 |
39 | - Implement endpoint protection and keep systems patched and current
40 |
41 | ### Networking
42 |
43 | - Limit communication between resources
44 |
45 | - Deny by default
46 |
47 | - Restrict inbound internet access and limit outbound, where
48 | appropriate
49 |
50 | - Implement secure connectivity to on-premises networks
51 |
52 | ## Perimeter
53 |
54 | - Use DDoS protection
55 |
56 | - Use perimeter firewalls to identify and alert on malicious attacks
57 | against your network
58 |
59 | ## Identity and access
60 |
61 | - Control access to infrastructure and change control
62 |
63 | - Use single sign-on and multi-factor authentication
64 |
65 | - Audit events and changes
66 |
67 | ## Physical security
68 |
69 | - Physical building security and controlling access to computing
70 | hardware within the data center is the first line of defence
71 |
72 | # Azure Security Center
73 |
74 | Security Center can:
75 |
76 | - Provide security recommendations based on your configurations,
77 | resources and networks
78 |
79 | - Monitor security settings and automatically apply required security
80 | to new services
81 |
82 | - Continuously monitor services to provide automatic security
83 | assessments
84 |
85 | - Use machine learning to detect and block malware from being installed
86 |
87 | - Analyse and identify inbound attacks
88 |
89 | - Provide just-in-time access control for ports
90 |
91 | ## Pricing Tiers
92 |
93 | - Free - Just assessments and recommendations of resources
94 |
95 | - Standard - Including continuous monitoring, threat detection etc.
96 |
97 | ## Usage scenarios
98 |
99 | You can use Security Center to:
100 |
101 | - Detect - Review the first indication of an event investigation
102 |
103 | - Assess - Perform the initial assessment to obtain more information
104 | about the suspicious activity
105 |
106 | - Implement a recommended security policy
107 |
108 | # Identity and access
109 |
110 |
111 | Establish the identity of a person or service looking to access a resource
112 |
113 |
114 |
115 | Establish what level of access an authenticated person or service has
116 |
117 |
118 | ## Azure Active Directory
119 |
120 | Azure AD provides services such as:
121 |
122 | - Authentication
123 |
124 | - Single Sign-On - One ID and password for multiple services
125 |
126 | - Application management
127 |
128 | - Business-to-Business identity services
129 |
130 | - Business-to-Customer identity services
131 |
132 | - Device management
133 |
134 | ## Providing identities to services
135 |
136 | ### Service Principals
137 |
138 |
139 | A thing that can be authenticated
140 |
141 |
142 |
143 | An identity acting with certain roles or claims
144 |
145 |
146 |
147 | An identity that is used by a service or application
148 |
149 |
150 | ### Managed identities for Azure services
151 |
152 | This makes creating service principles easier. A managed identity can be
153 | instantly created for any Azure service that supports it.
154 |
155 | ## Role based access control
156 |
157 | Roles are sets of permissions that users can be granted to access an
158 | Azure service instance.
159 |
160 | Identities are mapped to roles directly or through group membership.
161 |
162 | Roles can be granted at the individual service instance level, but they
163 | also flow down the Azure Resource Manager hierarchy.
164 |
165 | ### Privileged Identity Management
166 |
167 | This is an additional offering that provides oversight of role
168 | assignments to ensure people don’t have excess privileges.
169 |
170 | # Encryption
171 |
172 |
173 | Uses the same key to encrypt and decrypt the data
174 |
175 |
176 |
177 | Uses a public and private key pair
178 |
179 |
180 |
181 | Encrypting data that has been stored on a physical medium
182 |
183 |
184 |
185 | Encrypting data that is actively moving from one location to another
186 |
187 |
188 | ## Encryption on Azure
189 |
190 | - Azure Storage Service Encryption - For data at rest
191 |
192 | - Azure Disk Encryption - Encrypt virtual machine disks
193 |
194 | - Transparent data encryption - Protect Azure SQL database and Azure
195 | data warehouse
196 |
197 | - Azure key vault - encrypt secrets
198 |
199 | Benefits of using key vault:
200 |
201 | - Centralized application secrets
202 |
203 | - Securely stored secrets and keys
204 |
205 | - Monitor access and use
206 |
207 | - Simplified administration of application secrets
208 |
209 | - Integrate with other Azure services
210 |
211 | # Azure Certificates
212 |
213 | Certificates in Azure are **x.509 v3** and can be signed by a CA or self
214 | signed
215 |
216 | ## Service Certificates
217 |
218 | These are attached to cloud services and enable secure communication to
219 | and from this service.
220 |
221 | These are managed separately from the services.
222 |
223 | ## Management certificates
224 |
225 | These allow you to authenticate with the classic deployment model
226 |
227 | # Protect your network
228 |
229 |
230 | A service that grants server access based on the originating IP address of each request
231 |
232 |
233 | To provide inbound protection at the perimeter, you have several
234 | choices:
235 |
236 | - Azure Firewall - Managed cloud based network security service
237 |
238 | - Azure Application Gateway - Load balancer that includes a web
239 | application firewall
240 |
241 | - Network Virtual Appliances (NVAs) - Ideal for non-HTTP services or
242 | advanced configs
243 |
244 | ## DDoS Protection
245 |
246 | Basic:
247 |
248 | - Automatically enabled
249 |
250 | - Always on traffic monitoring and real time mitigation of common
251 | network level attcks
252 |
253 | Standard:
254 |
255 | - Can mitigate:
256 |
257 | - Volumetric attacks - Flooding network layer with traffic
258 |
259 | - Protocol attacks - Exploit weakness in layer 3 and layer 4
260 | protocol stack
261 |
262 | - Resource layer attacks - Target web application packets to
263 | disrupt the transmission of data between hosts
264 |
265 | ## Virtual network security
266 |
267 | For communication between virtual machines, Network Security Groups are
268 | a critical piece to restrict unnecessary communication.
269 |
270 | This allows you to filter network traffic to and from Azure resources in
271 | an Azure virtual network
272 |
273 | ## Network Integration
274 |
275 | To provide a dedicated private network between your network and Azure,
276 | you can use Azure ExpressRoute.
277 |
278 | # Protecting shared documents
279 |
280 | Azure information protection - A cloud-based solution to help
281 | organizations classify and optionally protect documents by applying
282 | labels
283 |
284 | # Azure Advanced Threat Protection
285 |
286 | This is a cloud-based solution to identify, detect and help to
287 | investigate threats.
288 |
289 | It has the following components:
290 |
291 | - ATP portal - Allows you to monitor and respond to suspicious
292 | activity
293 |
294 | - ATP sensor - Installed directly on domain controllers to monitor
295 | traffic
296 |
297 | - ATP cloud service - Runs on Azure infrastructure and is connected to
298 | Microsoft’s intelligent security graph
299 |
300 | # Security considerations for Application Lifecycle Management Solutions
301 |
302 | - Provide training to ensure everyone knows the threats
303 |
304 | - Define security requirements - Update continuously to address change
305 | in threat landscape.
306 |
307 | - Define metrics and compliance reporting - Have minimum levels of
308 | security quality
309 |
310 | - Perform threat modelling - Allows development teams to consider the
311 | security implications of designs
312 |
313 | - Establish design requirements - Specific security features must be
314 | implemented
315 |
316 | - Define and use cryptography standards
317 |
318 | - Manage security risks from using third-party components - Keep an
319 | accurate inventory and plan to respond when new vulnerabilities are
320 | discovered
321 |
322 | - Use approved tools - Define and publish a list of approved tools
323 |
324 | - Perform Static Analysis Security Testing - Analyse source code prior
325 | to compilation
326 |
327 | - Perform Dynamic Analysis Security Testing - Analyse fully-compiled
328 | code
329 |
330 | - Perform penetration testing
331 |
332 | - Establish a standard incident response process
333 |
--------------------------------------------------------------------------------
/notes/Open_Source/Git/Commands.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Git Commands"
3 | ---
4 |
5 | # Init
6 |
7 | To create a new git repository, you should use the `init` command, you can run
8 | it like so
9 |
10 | ```shell
11 | git init
12 | ```
13 |
14 | and a git repository will be created in your current directory
15 |
16 | # Clone
17 |
18 | However in many cases you will be working from a repository on a git provider
19 | like GitHub. For this you should use the `clone` command, this allows you to
20 | make a copy on your computer and links the repository so you can use the `push`
21 | and `pull` commands (explained later).
22 |
23 | You can do this simply from the GitHub website by clicking on the green **code**
24 | button and copying the link provided
25 |
26 | 
27 |
28 | Once you copy this URL, add it after `git clone` like so
29 |
30 | ```shell
31 | git clone https://github.com/init-OSS/initoss.git
32 | ```
33 |
34 | This will create a copy of the repository in the current directory
35 |
36 | # Add
37 |
38 | Prior to understanding the `git add` command, you must first understand the
39 | **staging area**
40 |
41 | ## Staging area
42 |
43 | The staging area is a place between your working directory and the git tree. The
44 | benefit here is that you might not want to add all the files you have changed in
45 | one commit. An example of why you might want to do this is if you have forgotten
46 | to commit for a while and so have changed files that reflect a number of
47 | different changes. This will work to help you to separate those changes.
48 |
49 | ## Add command
50 |
51 | A common use case is that you want to add all the changed files to the staging
52 | area, this can be done like so
53 |
54 | ```shell
55 | git add -A
56 | ```
57 |
58 | However you can also add single files like this:
59 |
60 | ```shell
61 | git add file.txt
62 | ```
63 |
64 | # Commit
65 |
66 | A git commit is a snapshot of the code in its current state. This is useful as
67 | it allows you to see how the code has changed over time, and if you introduce
68 | any bugs, it allows you to go back to a version prior to that introduction.
69 |
70 | It also allows others to better understand the code as they can see how
71 | different features were introduced.
72 |
73 | A git commit will be made from the **staging area**, so you will have to run
74 | `git add` in some way before this
75 |
76 | The most common way to do this from the command line is:
77 |
78 | ```shell
79 | git commit -m "Message"
80 | ```
81 |
82 | The `-m` flag here is to provide a message. If you do a simple `git commit` it
83 | will open your text editor to provide a message.
84 |
85 | # Push
86 |
87 | A git push is the process of moving the code from your computer to where it is
88 | hosted.
89 |
90 | A project can have multiple **remotes**, which are places the code is stored,
91 | however most will only have one. The naming convention for a single remote is to
92 | call it `origin`. This is what the remote will be called if you clone a
93 | repository.
94 |
95 | A git push command is accompanied by the remote you want and the branch in that
96 | remote, so the most common git push command will be:
97 |
98 | ```shell
99 | git push origin main
100 | ```
101 |
102 | `main` is moving to be the default branch name over `master`, but you will still
103 | see many repositories with `master` as the default branch, and so a push command
104 | would be
105 |
106 | ```shell
107 | git push origin master
108 | ```
109 |
--------------------------------------------------------------------------------
/notes/Open_Source/Git/GitKraken.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "GitKraken"
3 | ---
4 |
5 | Remembering all the git commands and what state all your files are in can
6 | sometimes be complex. For this reason, people create Graphical User Interfaces
7 | (GUIs) for git, one of the most popular being
8 | [GitKraken](https://www.gitkraken.com/invite/uPfG7AbY).
9 |
10 | An example view is this, showing the repository for this website:
11 |
12 | 
13 |
14 | This looks complicated, so we'll walk through each section
15 |
16 | ## Top bar
17 |
18 | 
19 |
20 | Many of the commands here are just replicas of git commands, so **Pull** is
21 | `git pull` etc. As discussed before, `git push` needs to be accompanied by the
22 | branch and remote, so GitKraken lets you set up defaults.
23 |
24 | If you've cloned a repo, then the branches will push to their counterparts on
25 | the remote, so `main` will push to `main` etc. When you create a branch, the
26 | first time you push the branch, it will ask you which branch you want to push it
27 | to, with the default being one with the same name.
28 |
29 | **Branch** allows you to create a new git branch, and prompts you for the name.
30 | Stash and pop are for more advanced git concepts called stashes.
31 |
32 | Timelines is a GitKraken exclusive feature and isn't git related.
33 |
34 | Another benefit here is the **Undo** and **Redo** buttons, these will try their
35 | best to undo and redo changes you've made if it's possible, so might save you
36 | from some mistakes.
37 |
38 | ## Right sidebar
39 |
40 | 
41 |
42 | This allows you to see your changed files, here you can see I'm working on this
43 | document about GitKraken. Those with the plus symbol are new files and ones with
44 | a pencil are edited files. You can easily stage all of these files with the
45 | **Stage all changes** button, or you can stage each individually. You also have
46 | the section at the bottom to add a commit message, then the button at the bottom
47 | can be used to commit the changes.
48 |
49 | ## Left sidebar
50 |
51 | 
52 |
53 | In general, you will use this sidebar much less than the right sidebar, but it
54 | is useful for some configuration.
55 |
56 | At the top under **LOCAL**, you can change between local branches, the
57 | equivalent of `git switch`.
58 |
59 | **REMOTE** lets you manage your remotes, here you can see I have this repo on
60 | both GitHub and GitLab.
61 |
62 | The next two sections are for Git hosting providers, showing both pull requests
63 | and issues.
64 |
65 | Git tags let you show versions of your code, and you will often see these being
66 | used in larger repositories.
67 |
68 | Git submodules let you embed a repository inside another, as a beginner you
69 | won't often see this.
70 |
71 | GitHub actions let you run scripts after you commit, here you can see I am using
72 | one called **CodeQL** which checks code for security vulnerabilities.
73 |
74 | ## Middle
75 |
76 | 
77 |
78 | You can see all your past commits in the middle section. Here you can see the
79 | merging of many dependency updates with **Bump** followed by **Merge**
80 |
81 | At the very top you can see `//WIP`, this is to show that I have uncommitted
82 | changes.
83 |
84 | Down the left-hand side you can see branches, both local and remote. Hovering
85 | over them shows their name, and the one with the laptop symbol signifies it is a
86 | local branch.
87 |
88 | This allows you to see where each branch is in your code, and how the remote
89 | compares with local. This is useful as you can see if other people have made
90 | changes to the code since you last pulled it and what changes the different
91 | branches have.
92 |
--------------------------------------------------------------------------------
/notes/Open_Source/Git/Introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Introduction to Git"
3 | ---
4 |
5 | Git is a **version control system**, this allows programmers to keep track of
6 | changes in their code.
7 |
8 | The benefit of this is that if you make changes that break functionality, you
9 | can easily go back to a previous version. It also allows for developing multiple
10 | things at once using a feature called **branches** and incorporating them into
11 | the main code when the feature is ready.
12 |
13 | While there are other version control systems, git is by far the most popular,
14 | particularly in open source projects. It has been popularised by the git hosting
15 | services [GitHub](https://github.com/) and [GitLab](https://about.gitlab.com/).
16 |
17 | Anything can be tracked in a git, but it is best for text files, as the changes
18 | to them are small. Using it for other things such as images does not being the
19 | same benefits as the changes are not as simple.
20 |
--------------------------------------------------------------------------------
/notes/Open_Source/GitHub/Fork_and_PR.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Forking and Pull Requests"
3 | ---
4 |
5 | The first step in contributing to an open source project is to **fork** it. This
6 | means to create a copy of the repository in your account. Once you do this, you
7 | can then make whatever changes you feel are appropriate. You can see which of
8 | your repositories are forks as they come with a note under the title (red added
9 | by me):
10 |
11 | 
12 |
13 | A **pull request** is a request from the forked repository back to the original
14 | repository to add the improvements. You can easily create a pull request from
15 | any branch back to the original repository, as they will have this banner above
16 | the code, and you can click **Pull Request** to start one
17 |
18 | 
19 |
20 | After doing this, you need to describe what your pull request does. Many large
21 | projects will have a template for pull requests, and the contents of that will
22 | be filled out already for you. You should edit this to describe your particular
23 | change, this allows the maintainers to better understand what your pull request
24 | does and why it is needed. If your problem is solving a certain issue, you
25 | should also mention that in your pull request.
26 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Boilerplate.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "HTML Boilerplate"
3 | ---
4 |
5 | The **boilerplate** of a HTML page looks like the below code snippet
6 |
7 |
8 | Sections of code that have to be included in many places with little or no
9 | alteration
10 |
11 |
12 | ```HTML
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | ```
23 |
24 | ## DOCTYPE
25 |
26 | At the top of every HTML document you will see ``, this tells the
27 | browser that the content of the file is HTML. This is largely unneeded in modern
28 | browsers as they will assume this, but it is best practice, so you should still
29 | include it.
30 |
31 | ## html tag
32 |
33 | The `html` tag is used to show that all the content inside should be processed
34 | as HTML. This is the root (top level) element of a HTML document. An important
35 | attribute to include on this tag is `lang`. This allows you to specify the
36 | language of your page, this is useful for screen readers for people with visual
37 | impairment. To specify the language to be english you would do
38 |
39 | ```HTML
40 |
41 |
42 |
43 | ```
44 |
45 | ## head tag
46 |
47 | The head is used for all the data that isn't displayed on the page. This
48 | includes a variety of things, including setting the page title and importing
49 | content.
50 |
51 | ### meta tag
52 |
53 | This tag is used to set **metadata** about the page
54 |
55 | Data about data
56 |
57 | The example here is to set the character set to be unicode. This allows for a
58 | wider range of characters, such as emojis. If this is not set, then characters
59 | might appear differently on different devices as it will be left to the browser
60 | to choose the character set.
61 |
62 | ### title tag
63 |
64 | This tag is used to set the title of the page, this will appear in the tabs in a
65 | browser. To set it, just insert the desired title inside the tag, for example.
66 |
67 | ```html
68 | Hello, World!
69 | ```
70 |
71 | ### body tag
72 |
73 | This is used for all the content on the page. Whatever you put in here will be
74 | put onto the page.
75 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Introduction to HTML"
3 | ---
4 |
5 | HTML determines the content of a webpage, and is a standard shared across all
6 | browsers.
7 |
8 | # Tags
9 |
10 | Tags in HTML are used structure the content in a webpage. They are denoted using
11 | less than and greater than symbols, such as ``. These symbols are
12 | sometimes called **angle brackets** as they act as brackets around the content.
13 |
14 | Tags that are opened should also be closed. This is done with the same tag, but
15 | with a slash immediately after the less than sign.
16 |
17 | ```HTML
18 |
19 |
20 |
21 | ```
22 |
23 | Some tags don't need closing, and we will get into those later
24 |
25 | ## Tag Attributes
26 |
27 | Opening tags can also have attributes, an example of this is the `` tag,
28 | this has a `lang` attribute
29 |
30 | ```HTML
31 |
32 |
33 |
34 | ```
35 |
36 | The most common uses of attributes are `style` and `class`, which we will get
37 | into later
38 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Links_and_Images.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Using links and images in HTML
3 | ---
4 |
5 | # Links
6 |
7 | Links allow you to direct the user to different pages on your site, or to
8 | different sites on the internet.
9 |
10 | Links use the `` tag and `href` attribute in order to work. An example of
11 | linking to google is
12 |
13 | ```HTML
14 | Google
15 | ```
16 |
17 | If you want to link to a page in your site, include all the link after your
18 | domain, including the slash. For example, if you look at the address bar for
19 | this page it says `https://initoss.dev/learn_code/HTML/4-Links`, so all you need
20 | to include is `/learn_code/HTML/4-Links` like this
21 |
22 | ```HTML
23 | Links
24 | ```
25 |
26 | If you instead want to link relative to where you are, start the URL with a dot.
27 | For example, if there was a page under this one called `relative`, using the
28 | link
29 |
30 | ```HTML
31 | Links
32 | ```
33 |
34 | would link there.
35 |
36 | # Images
37 |
38 | Images are inserted into HTML using the `` tag The source of the image is
39 | passed in using the `src` attribute, like in the following example
40 |
41 | ```html
42 |
43 | ```
44 |
45 | `alt` is provided for if the image can't be found and for accessibility. An
46 | example of why it might not be found is that you are using an image from a
47 | remote site and the site has gone down.
48 |
49 | As for accessibility, people who use screen readers will be read the `alt` text,
50 | so it is important for them that it is descriptive.
51 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Lists.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Using Lists in HTML
3 | ---
4 |
5 | There are two main types of lists in HTML, ordered and unordered. An ordered
6 | list uses numbers or another method of showing the items are ordered, whereas an
7 | unordered list will use bullet points.
8 |
9 | ## Ordered List
10 |
11 | An ordered list looks like this
12 |
13 | 1. Three
14 | 2. Ordered
15 | 3. Items
16 |
17 | It is implemented using the `ol` tag. List items are implemented using the `li`
18 | tag. So the above list looks like this in HTML:
19 |
20 | ```html
21 |
22 |
Three
23 |
Ordered
24 |
Items
25 |
26 | ```
27 |
28 | ## Unordered list
29 |
30 | An unordered list looks like this:
31 |
32 | - Three
33 | - Unordered
34 | - Items
35 |
36 | It is implemented using the `ul` tag. Again list items are implemented using the
37 | `li` tag. Meaning the above list looks like this in HTML
38 |
39 | ```html
40 |
41 |
Three
42 |
Unordered
43 |
Items
44 |
45 | ```
46 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Tables.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Using Tables in HTML
3 | ---
4 |
5 | To start with tables you use a `
` tag, this wraps the whole structure, in
6 | the same way as `` wraps your website.
7 |
8 | Each row is then implemented using `
` (table row)
9 |
10 | The in each row, you insert cells that are either **header** or **data**
11 |
12 | For header cells, you use the tag `
` and for data cells you use the tag
13 | `
`.
14 |
15 | There's a lot more to think about here than the previous examples, but an
16 | example should help
17 |
18 | ```html
19 |
20 |
21 |
Header 1
22 |
Header 2
23 |
24 |
25 |
Data 1
26 |
Data 2
27 |
28 |
29 | ```
30 |
31 | This would form a table that looks like this
32 |
33 | | Header 1 | Header 2 |
34 | | -------- | -------- |
35 | | Data 1 | Data 2 |
36 |
37 | We will come to the particular way in which tables can be styled in the CSS
38 | section
39 |
--------------------------------------------------------------------------------
/notes/Open_Source/HTML/Text_Formatting.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Basic Text Formatting"
3 | ---
4 |
5 | The most basic way to include text in your website is inside a `
` tag, this
6 | is for **paragraphs**, so standard formatted text. You use it as follows:
7 |
8 | ```html
9 |
Include your text here
10 | ```
11 |
12 | # Headings
13 |
14 | You can also add headings to your website, these are numbered `
` through to
15 | `
` and will be smaller as you increase the number. The styling of these is
16 | determined by your browser, but they will all follow this rule.
17 |
18 | You would use these as follows:
19 |
20 | ```html
21 |
Biggest title
22 |
Then this one
23 |
Then this one
24 |
Then this one
25 |
Then this one
26 |
And this is the smallest
27 | ```
28 |
29 | # Text styling
30 |
31 | There are many ways to style your text using HTML tags
32 |
33 | ## Bold
34 |
35 | To make text **bold**, you need to use the `` tag
36 |
37 | ```HTML
38 |
Normal text Now the text is bold back to normal
39 | ```
40 |
41 | You may also see `` being used. Most browsers will style these the same.
42 | `` is for text with "strong importance".
43 |
44 | ## Italic
45 |
46 | To make text _italic_, you need to use the `` tag, used in a very similar way
47 | to bold
48 |
49 | ```HTML
50 |
Normal text Here is italic text now back to normal
51 | ```
52 |
53 | There is also a similar tag ``, used for emphasis. Again this will usually
54 | be styled in the same way. A screen reader will place verbal stress on words in
55 | `` tags but not ``, so that is to consider
56 |
57 | ## Other styling
58 |
59 | There are a range of other styles, including
60 |
61 | - [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small)
62 | for small text
63 | - [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub) for
64 | subscript text
65 | - [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins) for
66 | text that has been added to a document
67 | - [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del) for
68 | text that has been removed from a document
69 | - [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark)
70 | for highlighted text
71 |
72 | However they are not commonly used so I won't go into detail on them
73 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Code.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Code in Markdown"
3 | ---
4 |
5 | # Inline
6 |
7 | Inline code flows with the text, for example `function`, the backticks here
8 | aren't default in HTML, instead are part of my styling. However backticks is how
9 | you use inline code.
10 |
11 | ```md
12 | for example `function`
13 | ```
14 |
15 | # Block
16 |
17 | Code blocks are distinct from the text, for example:
18 |
19 | ```js
20 | console.log("Hello World");
21 | ```
22 |
23 | These are used for larger snippets of code. They also have the option to add a
24 | language attribute, which can be used for syntax highlighting
25 |
26 | They are started with three backticks followed by the language and ended with
27 | three backticks.
28 |
29 |
38 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Introduction to Markdown"
3 | ---
4 |
5 | Markdown is a **markup language** in the same way that HTML is, allowing for
6 | dictating content structure.
7 |
8 | The advantage of markdown is that it has a much simpler syntax when compared to
9 | HTML, which we will go through in ths guide.
10 |
11 | Markdown also provides a subset of the features of HTML, meaning that markdown
12 | can be translated to HTML.
13 |
14 | For this reason, it is extensively used in documentation websites as they don't
15 | require complicated layouts. Some examples of this is the
16 | [Next.js documentation](https://nextjs.org/docs/getting-started),
17 | [Gatsby documentation](https://www.gatsbyjs.com/docs/), and many more, including
18 | this website.
19 |
20 | Contributing to documentation is a great way to get started with open source as
21 | it doesn't require in depth knowledge of the codebase and can even be done
22 | directly in the GitHub website.
23 |
24 | As well as in documentation, Markdown is used for README files, so whenever you
25 | see one of these in an open source project, it is made using Markdown.
26 |
27 | The file extension for markdown files is `.md`. You may also see files with the
28 | extension `.mdx`, such as the ones for this site, this is a superset of
29 | markdown, so you can use markdown inside it. I may also explain what you can do
30 | with `.mdx` in more advanced versions of this guide.
31 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Links_and_Images.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Links and Images in Markdown"
3 | ---
4 |
5 | # Links
6 |
7 | Links in markdown are inserted using the following syntax
8 |
9 | ```md
10 | [alt](https://google.com)
11 | ```
12 |
13 | The first parameter is mapped to the `alt` attribute in HTML and the second is
14 | mapped to the `href` attribute
15 |
16 | # Images
17 |
18 | Images use a very similar syntax, but with an exclamation point in front:
19 |
20 | ```md
21 | 
22 | ```
23 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Lists.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Lists in Markdown"
3 | ---
4 |
5 | Lists can be written basically as you would type it out. Bullets can be written
6 | with either a start `*` or dash `-`
7 |
8 | ```md
9 | - This
10 | - Is
11 | - An
12 | - Unordered
13 | - List
14 | ```
15 |
16 | For ordered lists, just start with numbers:
17 |
18 | ```md
19 | 1. This
20 | 2. Is
21 | 3. An
22 | 4. Ordered
23 | 5. List
24 | ```
25 |
26 | List with checkboxes.
27 |
28 | For a checked box, use `- [x]` and for an unchecked box, use `- [ ]`
29 |
30 | ```md
31 | - [x] Checked
32 | - [x] Box
33 | - [x] Example
34 | - [ ] Unchecked
35 | - [ ] Box
36 | - [ ] Example
37 | ```
38 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Tables.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Tables in Markdown"
3 | ---
4 |
5 | Tables in markdown have a much nicer syntax than in HTML, allowing them to be
6 | more easily interpreted
7 |
8 | The distinction between cells is created using the vertical bar symbol `|`
9 | dashes are also used to separate the header
10 |
11 | ```md
12 | | Heading 1 | Heading 2 |
13 | | --------- | --------- |
14 | | Cell 1 | Cell 2 |
15 | ```
16 |
17 | This translates to the table:
18 |
19 | | Heading 1 | Heading 2 |
20 | | --------- | --------- |
21 | | Cell 1 | Cell 2 |
22 |
--------------------------------------------------------------------------------
/notes/Open_Source/Markdown/Text_Formatting.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Text formatting in Markdown"
3 | ---
4 |
5 | # Headings
6 |
7 | Using headings in Markdown has a much nicer syntax than that in HTML, all you
8 | need is the hash symbol (`#`).
9 |
10 | The number of hashes corresponds to the `h` value in HTML. So `#` is for a
11 | `
`, `##` is for a `
` and so on.
12 |
13 | You add text to these headings by adding a space after the symbol then putting
14 | whatever you want the title to be
15 |
16 | ```md
17 | # This is the top level heading
18 |
19 | ## This is the second level
20 |
21 | ### Third level
22 |
23 | ###### And like HTML, it goes all the way down to 6
24 | ```
25 |
26 | # Text styling
27 |
28 | ## Bold
29 |
30 | For bold text there are two ways of formatting it, either with stars or
31 | underscores. Unlike in HTML, these do exactly the same thing and so are just
32 | personal preference. The only thing to remember is that there should be **two**
33 | of the symbol on each side
34 |
35 | ```md
36 | **This is bold**
37 | ```
38 |
39 | ## Italic
40 |
41 | Italics have very similar syntax, with the option of stars or underscores, but
42 | just with **one** symbol on each side
43 |
44 | ```md
45 | _This is italic_
46 | ```
47 |
48 | You will notice that I have done the two examples with different symbols, this
49 | is due to my code formatter, but is a good idea so that you can do things such
50 | as:
51 |
52 | ```md
53 | **This is bold _but with italic inside_ **
54 | ```
55 |
56 | with less confusion
57 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/ECC/Error_Correcting.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Error correcting codes
3 | ---
4 |
5 | ## Parity Check code
6 |
7 | 
8 |
9 | Can only detect **one** error and cannot correct any errors
10 |
11 | ## Repetition Code
12 |
13 | 
14 |
15 | Can correct
16 |
17 | $$
18 | \bigg\lfloor \dfrac{n-1}{2} \bigg\rfloor
19 | $$
20 |
21 | errors
22 |
23 | and can detect $n-1$ errors
24 |
25 | ## Hamming distance
26 |
27 | 
28 |
29 | Measures the number of differences (in this case 1)
30 |
31 | The **Hamming weight** is the number of non zeroes (2 for top, 1 for bottom)
32 |
33 | ## Minimum distance
34 |
35 | 
36 |
37 | A code can correct t errors iff it has a minimum distance
38 |
39 | $$
40 | d_{min}\geqslant 2t+1
41 | $$
42 |
43 | So for this code it can correct 1 error (min distance of 3 would also work to correct 1 error)
44 |
45 | 
46 |
47 | There needs to be overlap between the codes in order to be able to distinguish them
48 |
49 | As the $d_{min}$ is an integer value, the formula is equivalent to $d_{min}>2t$
50 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/ECC/Finite_Fields.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Finite Fields
3 | ---
4 |
5 | A group must follow the following rules
6 |
7 | Associativity:
8 |
9 | 
10 |
11 | Identity element:
12 |
13 | 
14 |
15 | Inverses:
16 |
17 | 
18 |
19 | ## Abelian group
20 |
21 | An abelian group is also commutative:
22 |
23 | 
24 |
25 | ## Field
26 |
27 | A field is a 5-tuple
28 |
29 | $$
30 | (F, +, \times, 0, 1)
31 | $$
32 |
33 | with
34 |
35 | 1. $(F, +)$ being an Abelian group with identity 0
36 |
37 | e.g. $1+0=0+1=1$
38 |
39 | 2. $(F*, \times)$ being an Abelian group with identity 1
40 |
41 | e.g. $2\times 1=1\times 2 = 2$
42 |
43 | 3. Multiplication distributes over the addition
44 |
45 | 
46 |
47 | ## Galois field
48 |
49 |
50 |
51 | Any finite field is of order $q=p^m$, where p is a prime number and m is an integer $\geqslant 1$. All fields of a given size are the same.
52 |
53 |
54 |
55 | These have two different notations that mean the same thing, $GF(q)$ and $\mathbb{F}_q$
56 |
57 | ## Extension field
58 |
59 | 
60 |
61 | 
62 |
63 | 
64 |
65 | ### Properties
66 |
67 | Multiplicative structure
68 |
69 | 
70 |
71 | Additive structure
72 |
73 | 
74 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/ECC/Hamming_Codes.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Hamming Codes
3 | ---
4 |
5 | ## Structure of a hamming code
6 |
7 | 
8 |
9 | This H is the **parity check matrix**
10 |
11 | ### Properties
12 |
13 | | Property | Value |
14 | | --------------------------- | ------------- |
15 | | Length | $2^r-1$ |
16 | | Dimension | $2^r-r-1$ |
17 | | Minimum distance | 3 |
18 | | Field order | 2 |
19 | | Redundancy | $r-k$ |
20 | | Rate | $1-r/(2^r-1)$ |
21 | | Error correction capability | 1 |
22 |
23 | From the parity check matrix, you can then form the Generator matrix
24 |
25 | 
26 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/ECC/Linear_Codes.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Linear codes
3 | ---
4 |
5 | ## Duals
6 |
7 | 
8 |
9 | ## Systematic form
10 |
11 | 
12 |
13 | ## Parity check matrix
14 |
15 | 
16 |
17 | You can use the knowledge of these two values to then find out the value of $k$
18 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/ECC/Reed-Muller.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Reed-Muller codes
3 | ---
4 |
5 | Boolean logic can also be expressed as calculations mod 2
6 |
7 | 
8 |
9 | | Boolean | Mod 2 |
10 | | ----------- | -------- |
11 | | $x \land y$ | $xy$ |
12 | | $x \lor y$ | $x+y+xy$ |
13 | | $\lnot x$ | $x+1$ |
14 | | $x\oplus y$ | $x+y$ |
15 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/Information_Theory/Capacity.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Capacity
3 | ---
4 |
5 | 
6 |
7 | The channel capacity is:
8 |
9 | $$
10 | \max_{p(x)} I(X;Y)
11 | $$
12 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/Information_Theory/Introduction.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Introduction to Information Theory
3 | ---
4 |
5 | ## Discrete random variables
6 |
7 | 
8 |
9 | 
10 |
11 | ## Entropy
12 |
13 | 
14 |
15 | ## Jensen's inequality
16 |
17 | 
18 |
19 | Jensen's inequality states
20 |
21 | $$
22 | \mathbb{E}(f(Y))\geqslant f(\mathbb{E}(Y))
23 | $$
24 |
25 | This can be shown in the below diagram
26 |
27 | 
28 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/CaC/Information_Theory/Mutual_Information.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Mutual Information
3 | ---
4 |
5 | ## Venn Diagram of Entropy
6 |
7 | 
8 |
9 | $I(X,Y)$ is the **mutual information**
10 |
11 | $H(Y|X)$ is the information Y provides given that X is known. This is expected to be less than $H(Y)$ as by having joint entropy, the value of X provides some information about Y.
12 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/DADS/Cuckoo_Hashing.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cuckoo Hashing
3 | ---
4 |
5 | # Hash Tables
6 |
7 | 
8 |
9 | # Dictionary Operations
10 |
11 | 
12 |
13 | # Hashing with chaining
14 |
15 | 
16 |
17 | [Link](https://excalidraw.com/#json=4841504023511040,zBZTnaNbquBLNZtd_z8V5A)
18 |
19 | # Cuckoo Hashing
20 |
21 | 
22 |
23 | 
24 |
--------------------------------------------------------------------------------
/notes/University_Illustrations/DADS/Probability.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Introduction to Probability
3 | ---
4 |
5 | # Axioms of Probability
6 |
7 | 
8 |
9 | This then leads to further rules
10 |
11 | 
12 |
13 | # Conditional Probability
14 |
15 | 
16 |
17 | # Uniform Distribution
18 |
19 | 
20 |
21 | # Independent Probabilities
22 |
23 | 
24 |
25 | ## Pairwise Independence
26 |
27 | 
28 |
29 | Every pair of events are independent of each other
30 |
31 | ## Mutual Independence
32 |
33 | The probability of all of a subset of events happening in the multiplication
34 |
35 | 
36 |
37 | # Random variable
38 |
39 | 
40 |
41 | The probability that a variable takes a certain value
42 |
43 | ## Independence
44 |
45 | 
46 |
47 | The probability $A=x$ and $B=y$ is the probability $A=x$ multiplied by the probability $B=y$
48 |
49 | ## Expected value
50 |
51 | 
52 |
53 | The expected value is x times the probability of x for all x
54 |
55 | This can also be shown as the area under the curve
56 |
57 | ## Linearity of expectation
58 |
59 | 
60 |
61 | The expected value of A and B is the expected value of A plus the expected value of B
62 |
63 | **This doesn't apply for multiplication, only if they are independent**
64 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "notes-site",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "build": "next build",
7 | "dev": "next",
8 | "export": "next build && next export",
9 | "find:unused": "next-unused",
10 | "postbuild": "next-sitemap",
11 | "start": "next start"
12 | },
13 | "dependencies": {
14 | "@mapbox/rehype-prism": "^0.6.0",
15 | "@samrobbins/admonition-components": "^3.0.0",
16 | "@samrobbins/typography": "^1.3.0",
17 | "@tailwindcss/forms": "^0.3.3",
18 | "@tailwindcss/typography": "^0.4.0",
19 | "autoprefixer": "^10.2.0",
20 | "base-64": "^1.0.0",
21 | "directory-tree": "^2.2.5",
22 | "gray-matter": "^4.0.2",
23 | "katex": "^0.16.10",
24 | "next": "^14.2.21",
25 | "next-mdx-remote": "^3.0.4",
26 | "pako": "^2.0.4",
27 | "postcss": "^8.4.31",
28 | "postcss-import": "^14.0.0",
29 | "postcss-preset-env": "^6.7.0",
30 | "react": "^18.2.0",
31 | "react-dom": "^18.2.0",
32 | "rehype-katex": "^4.0.0",
33 | "remark": "^13.0.0",
34 | "remark-autolink-headings": "^6.0.1",
35 | "remark-emoji": "^2.1.0",
36 | "remark-footnotes": "^3.0.0",
37 | "remark-html": "^13.0.2",
38 | "remark-math": "^4.0.0",
39 | "remark-slug": "^6.0.0",
40 | "retext": "^7.0.1",
41 | "retext-smartypants": "^4.0.0",
42 | "tailwindcss": "^2.1.2",
43 | "unist-util-visit": "^2.0.3",
44 | "utf8": "^3.0.0"
45 | },
46 | "devDependencies": {
47 | "@next/bundle-analyzer": "^11.1.0",
48 | "eslint": "^7.32.0",
49 | "eslint-plugin-react": "^7.22.0",
50 | "eslint-plugin-react-hooks": "^4.2.0",
51 | "next-sitemap": "^1.6.148",
52 | "next-unused": "^0.0.6",
53 | "nextjs-sitemap-generator": "^1.3.0",
54 | "prettier": "^2.3.2",
55 | "prettier-plugin-package": "^1.3.0"
56 | },
57 | "next-unused": {
58 | "alias": {},
59 | "include": [
60 | "pages",
61 | "components",
62 | "lib"
63 | ],
64 | "exclude": [],
65 | "entrypoints": [
66 | "pages",
67 | "components",
68 | "lib"
69 | ]
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/pages/404.js:
--------------------------------------------------------------------------------
1 | import Link from "next/link";
2 | import Head from "next/head";
3 | export default function Custom404() {
4 | return (
5 | <>
6 |
7 | 404 - Page not found
8 |
9 |
10 |
11 |
12 | Oops, that's a 404, looks like you're lost
13 |