Skip to content

Commit da60c69

Browse files
committed
Batch of updates
1 parent 873c137 commit da60c69

File tree

99 files changed

+7341
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+7341
-94
lines changed

Caddyfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
localhost:2020
2+
3+
file_server browse
4+
encode gzip

assembler/assembler-arm/arm-basics.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,29 @@ Data processing instructions have the following format
7979
* Immediate operand
8080
* lets you hard code operands into the instruction steam
8181

82+
Each instruction:
83+
8284
1. Takes one clock cycle to be loaded from memory
8385
2. Takes one clock cycle to be decoded
8486
3. Takes one clock cycle to execute
8587

86-
In each clock cycle the processor is moving instructions through the load -> decode -> execute cycle
88+
In each clock cycle the processor is moving instructions through the
89+
90+
load -> decode -> execute
91+
92+
cycle
8793

8894
This works best with a linear block of instructions
8995

90-
### THe ugly truth about addressing main memory with 32 bit instructions
96+
## THe ugly truth about addressing main memory with 32 bit instructions
9197

9298
Notice that none of the operand boxes above are 32 bits so you can't directly put a whole memory address into it (e.g. when loading a value from memory)
99+
93100
The biggest field in the instruction is the 12 bit "immediate operand"
101+
94102
Question: So how do we address 32 bit values with only 12 bits available?
95103
Answer: It treats the 12 bits as an offset from the current value of the PC (so you can load any value within 4096 words of the PC)
96104
* some of the bits are used as a shift to increase that 4096 range
97105
* HOW???
98106

99-
Happily assemblers take care of this drama for you.
100-
This does mean that what you read in an assembler listing will not match the assmebler you write
107+
Happily assemblers take care of this drama for you. This does mean that what you read in an assembler listing will not match the assembler you write!

assembler/assembler-arm/book-modern-assembly-lang-prog-with-arm-processor.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ There are three main ways of representing signed integers
3737
* the first digit is used to represent whether the number is positive or negative
3838
* this is subtly different to how it works in _sign magnitude_
3939
* number is negative if `first_digit > radix / 2`
40-
* Aside: two's complement is not a more efficeint way to store numbers
40+
* Aside: two's complement is not a more efficient way to store numbers
4141
(it is more efficient for doing computations with them)
4242
* the other digits represent the magnitude
4343
* the magnitude of a number can be found by taking its "radix complement"
@@ -50,7 +50,7 @@ There are three main ways of representing signed integers
5050
* to get the two's complement
5151
1. flip all the bits (to get the diminished radix complement)
5252
1. add 1 (to get to the radix complement)
53-
* ++ hardware is simplified because you don't have to build a specialized subtractor circuit
53+
* ++ hardware is simplified because you don't have to build a specialized subtracter circuit
5454
* ++ is the most common way to represent signed numbers in computers
5555
* -- harder for humans to do in their head
5656
* complement notation is most useful in base 2 (binary) numbers
@@ -108,15 +108,16 @@ first digit is the n+1 digit which we remove to subtract base^n from the number
108108
* Assembler uses ASCII NUL (0x00) to represent the end of strings in memory aka "the null terminated string"
109109
* ISO 8559 family of standards all extend ASCII to 8 bits
110110
* They are incompatible with each other e.g. ISO-8559-1 (Latin1) will map different glyphs to values 0x7F to 0xFF than ISO-8559-9 (Latin 5 Turkish) will
111-
* ISO/IEC 10646 Universal charaacter set solves this
111+
* ISO/IEC 10646 Universal character set solves this
112112
* defines code points (numbers) for almost all human languages
113-
* code points written as `U+XXXXX`
113+
* code points usually written as `U+XXXXX`
114114
* Unicode extends ISO 10646 with language specific features
115115
* There are a number of encodings available for codepoints from 10646 e.g.
116116
* UTF-8
117117
* variable length encoding
118-
* uses the upper bits of each byte to identify whether it is the start of a new character of the continuiation of one
118+
* uses the upper bits of each byte to identify whether it is the start of a new character of the continuation of one
119119
* UTF-16
120+
* was the default on macOS and Windows (might still be?)
120121
* UTF-32
121122
* use 4 bytes for each character
122123
* ++ simple

assembler/assembler-arm/raspberry-pi.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ Includes the `Broadcom BCM2837` SoC
1010
* The Cortex-A53 supports the full ARMv8-A architecture.
1111
* It not only runs 64-bit applications also seamlessly and efficiently runs legacy ARM 32-bit applications.
1212

13-
1413
## My Raspberry Pi 3
1514

1615
* has 31 general purpose 64-bit registers
1716
* has 32 floating point (NEON) registers which are 128bits wide
1817

19-
2018
```
2119
# specs for my Pi
2220
Revision Release Date Model PCB Revision Memory Notes
@@ -73,3 +71,4 @@ Serial : 000000005319d64d
7371

7472
# Raspberry Pi 4
7573

74+
TODO

assembler/code-style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Overview
77

88
* set tab width something consistent
99
* instruction memonics and operand names in lowercase
10-
* lots of comments
10+
* use lots of comments
1111
* clear columns for
1212
* labels
1313
* instruction name

assembler/file-extensions.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
`gcc` file extensions
1+
# Assembly file extensions
2+
3+
`gcc` file extensions:
24

35
* `.s` = assembly file
46
* `.S` = assembly file that must be preprocessed with the C pre-processor (CPP)
5-
* handy if you are mixing C and assembler in a project and you want to make use of your C macros
6-
7-
The C preprocessor does things like #define #ifdef etc.
8-
9-
ARM assembler provides `.eq` and `.ifdef` macros
7+
* The assembler also has a macro system e.g. ARM assembler provides `.eq` and `.ifdef` macros
8+
* This file type is handy if you are mixing C and assembler in a project and you want to make use of your C macros

aws/iam/policy-cheatsheet.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
3+
6 policy types
4+
5+
1. Identity based
6+
2. Resource based
7+
3. Permissions boundary
8+
4. SCP
9+
* The pattern in an ACP is to have one Allow statement which allows everything and then explicitly Deny things in granular way
10+
* If an SCP is considered as part of a request, it **must** have an Allow for the action
11+
5. ACL
12+
6. Session policy
13+
14+
Basics
15+
16+
* statements are logical OR'd together
17+
* policies have a size limits which vary between type and can be extended https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html
18+
19+
Important parts
20+
21+
* `Principal` is sometimes required, sometimes forbidden
22+
1. Identity based = forbidden
23+
2. Resource based = required
24+
3. Permissions boundary = ???
25+
4. SCP = ???
26+
5. ACL = ???
27+
6. Session policy = ???
28+
* `Resource` is sometimes required, sometimes forbidden
29+
1. Identity based = required
30+
2. Resource based = optional (if missing, it is set to the resource you are attaching it to
31+
3. Permissions boundary = ???
32+
4. SCP = ???
33+
5. ACL = ???
34+
6. Session policy = ???
35+
* `Action`
36+
* always required
37+
* list of actions
38+
* not all actions apply to all services so sometimes if the `Principal` is set to `*` you can still constrain it to a service by choosing the right actions
39+
* `Condition`
40+
* conditions which must be true for the statement to apply
41+
42+
43+
Evaluation
44+
45+
Good diagram: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html
46+
47+
Every principal except the root account is implicitly denied everything by default. The root account is allowed by default in their account
48+
49+
1. AWS evaulates the collection of policies which apply to a given request
50+
1. An explicit Allow in a policy overrides the default implicit Deny
51+
1. An explicit Deny in a policy overrides any Allow in another policy
52+
53+
* => so the policies must have an Allow for the action in the request
54+
* => but if another policy has an explicit Deny then the deny wins
55+
+45-9
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,44 @@
33
* A set of best practices for building on the AWS cloud
44
* Created by AWS solutions architects (employees)
55

6+
## Framework Overview document
7+
8+
Well Architected is:
9+
10+
1. 5 part document
11+
1. WA tool
12+
* part of the management console
13+
* a workload = collection of aws resources that delivers some business value
14+
* can be a subset of an account or can span multiple accounts
15+
* kind of a Safeplus for AWS architecture
16+
1. WA labs
17+
* https://www.wellarchitectedlabs.com/
18+
* A set of tutorials about implementing some best practices
19+
* Static site built from a github repo
20+
1. WA Partner program
21+
622

723
5 Pillars
824

925
1. Operational excellence
1026
* run and monitor systems to deliver business value
1127
* continually improve supporting processes
12-
1. Security
28+
2. Security
1329
* protect information, systems, assets
1430
* risk assessments
1531
* risk mitigations
16-
1. Reliability
32+
3. Reliability
1733
* ability to recover from infrastructure disruptions
18-
* dynamically aquire computing resources to meet demand
34+
* dynamically acquire computing resources to meet demand
1935
* mitigate disruptions such as misconfiguration or network latency
20-
1. Performance efficiency
21-
* use computing resources effeciently
22-
* maintain that effeciency as demand changes and technologies evolve
23-
1. Cost optimization
36+
4. Performance efficiency
37+
* use computing resources efficiently
38+
* maintain that efficiency as demand changes and technologies evolve
39+
5. Cost optimization
2440
* deliver business value at the lowest price point
2541

26-
When architecting, you make trade-offs between these pillars depending on business context e.g.
42+
When designing architectures, you make trade-offs between these pillars depending on business context e.g.
43+
2744
* Trade off reliability for cost optimization in development environments
2845
* Security and operational excellence are generally not traded off against
2946

@@ -35,6 +52,7 @@ Terms
3552
* Workload
3653
* a collection of components working together to deliver business value
3754
* is usually the level of detail that business & technology leaders discuss
55+
* can be a subset of resources in an account or can span accounts
3856
* Milestones
3957
* mark key phases in your architecture
4058
* design, testing, go-live, production
@@ -71,4 +89,22 @@ They mitigate the risks by
7189
1. Mechanisms
7290
* automated checks for compliance to best practices to make sure standards are met
7391

74-
UP TO GENERAL DESIGN PRINCIPLES
92+
### Operational excellence pillar
93+
94+
5 design principles for operational excellence in the cloud:
95+
96+
1. Perform operations as code
97+
2. Make frequent, small, reversible changes
98+
* Design workloads to allow components to be updated regularly
99+
* Ideally make small changes which can be reversed if they fail
100+
3. Refine operations procedures frequently
101+
* e.g. regular game days
102+
4. Anticipate failure
103+
* Test failure scenarios
104+
5. Learn from all operational failures
105+
* Share learning between teams after events
106+
107+
108+
## Operational Excellence document
109+
110+
TODO as are all other pillar docs

0 commit comments

Comments
 (0)