Autosave: 2024-06-16 18:15:03
This commit is contained in:
parent
426fafb8fa
commit
ba93ba0ea1
49 changed files with 119 additions and 132 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
|
@ -48,3 +48,22 @@ aws cloudformation delete-stack --stack-name <my_stack> --region <region>
|
||||||
```
|
```
|
||||||
aws ce get-cost-and-usage --time-period Start=$(date +%Y-%m-01),End=$(date -d @$(( $(date +%s) + 86400 )) +%Y-%m-%d) --granularity MONTHLY --metrics "UnblendedCost" "UsageQuantity
|
aws ce get-cost-and-usage --time-period Start=$(date +%Y-%m-01),End=$(date -d @$(( $(date +%s) + 86400 )) +%Y-%m-%d) --granularity MONTHLY --metrics "UnblendedCost" "UsageQuantity
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Retrieve current user
|
||||||
|
|
||||||
|
```
|
||||||
|
aws-sts get-caller-identity
|
||||||
|
```
|
||||||
|
|
||||||
|
### List users
|
||||||
|
|
||||||
|
```
|
||||||
|
aws configure list
|
||||||
|
aws configure list-profiles
|
||||||
|
```
|
||||||
|
|
||||||
|
### View profile data
|
||||||
|
|
||||||
|
```
|
||||||
|
vim ./aws/credentials
|
||||||
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- computer-architecture
|
- operating-systems
|
||||||
---
|
---
|
||||||
|
|
||||||
# Daemons
|
# Daemons
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
tags:
|
tags:
|
||||||
- SQL
|
- SQL
|
||||||
- databases
|
- databases
|
||||||
|
- data-types
|
||||||
---
|
---
|
||||||
|
|
||||||
# Data types in MySQL
|
# Data types in MySQL
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [AWS]
|
tags:
|
||||||
|
- AWS
|
||||||
|
- databases
|
||||||
---
|
---
|
||||||
|
|
||||||
# Database options
|
# Database options
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- theorems
|
||||||
|
- logic
|
||||||
|
- propositional-logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# DeMorgan's Laws
|
# DeMorgan's Laws
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
|
- computer-architecture
|
||||||
|
- Linux
|
||||||
---
|
---
|
||||||
|
|
||||||
# Devices
|
# Devices
|
||||||
|
@ -42,7 +44,7 @@ brw-rw---- 1 root disk 259, 3 Jun 4 11:00 nvme0n1p3
|
||||||
> programs like `ls` and `cat`.
|
> programs like `ls` and `cat`.
|
||||||
|
|
||||||
The
|
The
|
||||||
[mode](File_permissions_and_execution.md#what-the-output-means)
|
[mode](File_permissions_and_execution_in_Bash.md#what-the-output-means)
|
||||||
is different from ordinary files. Each device file is prepended with
|
is different from ordinary files. Each device file is prepended with
|
||||||
`b, p, c, s` before the standard permissions. These stand for the major types of
|
`b, p, c, s` before the standard permissions. These stand for the major types of
|
||||||
devices: _block, character, pipe_ and _socket_.
|
devices: _block, character, pipe_ and _socket_.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: [circuits]
|
tags:
|
||||||
|
- electronics
|
||||||
---
|
---
|
||||||
|
|
||||||
# Digital circuits
|
# Digital circuits
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- propositional-logic
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Disjunction Elimination
|
# Disjunction Elimination
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- propositional-logic
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Disjunction Introduction
|
# Disjunction Introduction
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
---
|
---
|
||||||
tags: [systems-programming]
|
tags:
|
||||||
|
- systems-programming
|
||||||
|
- disks
|
||||||
|
- procedural
|
||||||
|
- Linux
|
||||||
---
|
---
|
||||||
|
|
||||||
# Disk info routines
|
# Disk info routines
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
---
|
---
|
||||||
id: 6g54
|
id: 6g54
|
||||||
title: Docker_CLI
|
title: Docker_CLI
|
||||||
tags: []
|
tags:
|
||||||
|
- docker
|
||||||
|
- shell
|
||||||
created: Saturday, March 30, 2024
|
created: Saturday, March 30, 2024
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
id: fw56
|
id: fw56
|
||||||
title: Docker compose and Dockerfile difference
|
title: Docker compose and Dockerfile difference
|
||||||
tags: []
|
tags:
|
||||||
|
- docker
|
||||||
created: Tuesday, March 26, 2024
|
created: Tuesday, March 26, 2024
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
id: dmuz
|
|
||||||
title: Docker_rough_notes
|
|
||||||
tags: []
|
|
||||||
created: Saturday, March 30, 2024
|
|
||||||
---
|
|
||||||
|
|
||||||
# Docker_rough_notes
|
|
||||||
|
|
||||||
## Creating and running a simple image (without Docker compose)
|
|
||||||
|
|
||||||
Create the Dockerfile in the root of the project.
|
|
||||||
|
|
||||||
Then build the image from root.
|
|
||||||
|
|
||||||
```
|
|
||||||
docker build -t image-name .
|
|
||||||
```
|
|
||||||
|
|
||||||
The image name is defined at this point, not pre-defined.
|
|
||||||
|
|
||||||
If successful, run the image:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run --name your-container-name image-name
|
|
||||||
```
|
|
||||||
|
|
||||||
Again, the container-name is defined at the point of the `run` declaration.
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
---
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
---
|
||||||
|
|
||||||
# Docker storage
|
# Docker storage
|
||||||
|
|
||||||
The following problems related to storage face containerized environments:
|
The following problems related to storage face containerized environments:
|
||||||
|
|
10
zk/Errata.md
10
zk/Errata.md
|
@ -1,10 +0,0 @@
|
||||||
- Investigate AWS Amplify, specifically how it relates to local development
|
|
||||||
- VSCode plugin for AWS
|
|
||||||
- VSCode plugin for Mongo
|
|
||||||
- Research what Elastic Beanstalk is and how it differs from other types of
|
|
||||||
development on AWS
|
|
||||||
- Step functions
|
|
||||||
- CloudFormation
|
|
||||||
- ElastiCache
|
|
||||||
- CloudFront
|
|
||||||
- CloudWatchkz
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- OOP
|
- OOP
|
||||||
|
- design-patterns
|
||||||
---
|
---
|
||||||
|
|
||||||
# Factory pattern
|
# Factory pattern
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- disks
|
- disks
|
||||||
|
- computer-architecture
|
||||||
|
- operating-systems
|
||||||
---
|
---
|
||||||
|
|
||||||
# Filesystems
|
# Filesystems
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
id: 5faz2y2e
|
id: 5faz2y2e
|
||||||
title: Format specifiers in C
|
title: Format specifiers in C
|
||||||
tags: []
|
tags:
|
||||||
|
- C
|
||||||
created: Thursday, February 29, 2024 | 17:41
|
created: Thursday, February 29, 2024 | 17:41
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [logic-gates, binary]
|
tags:
|
||||||
|
- logic-gates
|
||||||
|
- binary
|
||||||
---
|
---
|
||||||
|
|
||||||
# Four-bit adder
|
# Four-bit adder
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- data-structures
|
||||||
---
|
---
|
||||||
|
|
||||||
# Frequency counters
|
# Frequency counters
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
---
|
|
||||||
tags: [AWS]
|
|
||||||
---
|
|
||||||
|
|
||||||
# SAM frequent commands
|
|
||||||
|
|
||||||
### Retrieve current user
|
|
||||||
|
|
||||||
```
|
|
||||||
aws-sts get-caller-identity
|
|
||||||
```
|
|
||||||
|
|
||||||
### List users
|
|
||||||
|
|
||||||
```
|
|
||||||
aws configure list
|
|
||||||
aws configure list-profiles
|
|
||||||
```
|
|
||||||
|
|
||||||
### View profile data
|
|
||||||
|
|
||||||
```
|
|
||||||
vim ./aws/credentials
|
|
||||||
```
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
tags:
|
|
||||||
- javascript
|
|
||||||
- react
|
|
||||||
- testing
|
|
||||||
---
|
|
||||||
|
|
||||||
# Testing that functions are called on click events
|
|
||||||
|
|
||||||
https://stackoverflow.com/a/73167308
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- yaml
|
||||||
---
|
---
|
||||||
|
|
||||||
# Guide to YAML
|
# Guide to YAML
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- REST
|
||||||
---
|
---
|
||||||
|
|
||||||
## GET
|
## GET
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
---
|
|
||||||
id: hb10
|
|
||||||
title: Headless network setup
|
|
||||||
tags: [networks, Linux]
|
|
||||||
created: Wednesday, June 12, 2024
|
|
||||||
---
|
|
||||||
|
|
||||||
# Headless network setup
|
|
||||||
|
|
||||||
If you are using a headless system and you aren't using an ethernet connection,
|
|
||||||
you face a chicken-egg issue of how to connect the device to WiFi via `ssh` when
|
|
||||||
the device isn't yet on the network.
|
|
||||||
|
|
||||||
You can get around this by saving a file called `wp_supplicant.conf` to the
|
|
||||||
`/boot` directory of the device. This specifies the SSID name and password and
|
|
||||||
will be used to auto-connect when the device boots.
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
country=GB
|
|
||||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
|
||||||
update_config=1
|
|
||||||
network={
|
|
||||||
ssid="SKYVL7XP"
|
|
||||||
scan_ssid=1
|
|
||||||
psk="WIFI_PASSWORD"
|
|
||||||
key_mgmt=WPA-PSK
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Related notes
|
|
|
@ -1,12 +1,35 @@
|
||||||
---
|
---
|
||||||
id: hb10
|
id: hb10
|
||||||
title: Headless network setup
|
title: Headless network setup
|
||||||
tags: []
|
tags:
|
||||||
|
- networks
|
||||||
|
- Linux
|
||||||
|
- raspberry-pi
|
||||||
created: Wednesday, June 12, 2024
|
created: Wednesday, June 12, 2024
|
||||||
---
|
---
|
||||||
|
|
||||||
# Headless network setup
|
# Headless network setup
|
||||||
|
|
||||||
|
If you are using a headless system and you aren't using an ethernet connection,
|
||||||
|
you face a chicken-egg issue of how to connect the device to WiFi via `ssh` when
|
||||||
|
the device isn't yet on the network.
|
||||||
|
|
||||||
|
You can get around this by saving a file called `wp_supplicant.conf` to the
|
||||||
|
`/boot` directory of the device. This specifies the SSID name and password and
|
||||||
|
will be used to auto-connect when the device boots.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
country=GB
|
||||||
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
|
update_config=1
|
||||||
|
network={
|
||||||
|
ssid="SKYVL7XP"
|
||||||
|
scan_ssid=1
|
||||||
|
psk="WIFI_PASSWORD"
|
||||||
|
key_mgmt=WPA-PSK
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Related notes
|
## Related notes
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: [number-systems]
|
tags:
|
||||||
|
- number-systems
|
||||||
|
- hardware
|
||||||
|
- computer-architecture
|
||||||
---
|
---
|
||||||
|
|
||||||
# Hexadecimal number system
|
# Hexadecimal number system
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [logic-gates]
|
tags:
|
||||||
|
- logic-gates
|
||||||
|
- electronics
|
||||||
---
|
---
|
||||||
|
|
||||||
# Integrated circuits
|
# Integrated circuits
|
||||||
|
|
|
@ -116,7 +116,7 @@ string:
|
||||||
```
|
```
|
||||||
|
|
||||||
We could also use
|
We could also use
|
||||||
[list comprehension](List_comprehension_etc.md)
|
[list comprehension](List_comprehension_in_Python.md)
|
||||||
to achieve the same outcome:
|
to achieve the same outcome:
|
||||||
|
|
||||||
```py
|
```py
|
||||||
|
@ -193,7 +193,7 @@ will simply overwrite the old value for that key.
|
||||||
|
|
||||||
Accordingly, we create a dictionary which uses the unique key in each list as
|
Accordingly, we create a dictionary which uses the unique key in each list as
|
||||||
the key of each dictionary entry via
|
the key of each dictionary entry via
|
||||||
[dictionary comprehension](List_comprehension_etc.md#dictionary-comprehension)
|
[dictionary comprehension](List_comprehension_in_Python.md#dictionary-comprehension)
|
||||||
that loops through each value in the inner lists of the multidimensional array.
|
that loops through each value in the inner lists of the multidimensional array.
|
||||||
We then parse the values of the dictionary into a list.
|
We then parse the values of the dictionary into a list.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
|
- procedural
|
||||||
---
|
---
|
||||||
|
|
||||||
## Kill a process running on a port
|
## Kill a process running on a port
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: [electricity, circuits]
|
tags:
|
||||||
|
- electronics
|
||||||
---
|
---
|
||||||
|
|
||||||
# LEDs
|
# LEDs
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [AWS]
|
tags:
|
||||||
|
- AWS
|
||||||
|
- aws-lambda
|
||||||
---
|
---
|
||||||
|
|
||||||
# Lambda directory structure
|
# Lambda directory structure
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: [python]
|
tags:
|
||||||
|
- python
|
||||||
|
- aws-lambda
|
||||||
|
- AWS
|
||||||
---
|
---
|
||||||
|
|
||||||
# Lambdas in Python
|
# Lambdas in Python
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- disks
|
- disks
|
||||||
|
- Linux
|
||||||
|
- procedural
|
||||||
---
|
---
|
||||||
|
|
||||||
# Linux disk partitions
|
# Linux disk partitions
|
||||||
|
|
|
@ -34,7 +34,7 @@ read
|
||||||
|
|
||||||
## Example of piping to read
|
## Example of piping to read
|
||||||
|
|
||||||
Here we use [find](Find.md) to collate the files in
|
Here we use [find](Find_Bash_command.md) to collate the files in
|
||||||
the current directory and then pipe them to read.
|
the current directory and then pipe them to read.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -117,4 +117,4 @@ fi
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: this syntax can also be used to test if a given element exists in an
|
> Note: this syntax can also be used to test if a given element exists in an
|
||||||
> [array](Lists_and_arrays.md).
|
> [array](Lists_and_arrays_in_Bash.md).
|
||||||
|
|
1
zk/jq.md
1
zk/jq.md
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- json
|
- json
|
||||||
|
- shell
|
||||||
---
|
---
|
||||||
|
|
||||||
# jq
|
# jq
|
||||||
|
|
Loading…
Add table
Reference in a new issue