Skip to content

Commit 98176a2

Browse files
committed
Various updates
1 parent 0f4861c commit 98176a2

File tree

9 files changed

+140
-28
lines changed

9 files changed

+140
-28
lines changed

src/pages/_index-links.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const {
107107
<li><b>Cheatsheets and Checklists</b>
108108
<ul>
109109
{showWIP && <li><a href="/tech/cheatsheets/computer-maintenance-checklists/"><b>Computer Maintenance Checklists</b></a> <Wip /></li>}
110+
<li><a href="/tech/cheatsheets/emoji/"><b>Emoji</b></a></li>
110111
{showWIP && <li><a href="/tech/cheatsheets/ffmpeg/"><b>FFmpeg</b></a> <Wip /></li>}
111112
<li><a href="/tech/cheatsheets/new-computer-checklist/"><b>New Computer Checklist</b></a></li>
112113
{showWIP && <li><a href="/tech/cheatsheets/windows-sysadmin/"><b>Windows SysAdmin</b></a> <Wip /></li>}

src/pages/c/cheatsheets/sql.mdx

Lines changed: 86 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
---
22
layout: "@layouts/MDLayout.astro"
3-
title: SQL and Common Relational DBMS Features Cheatsheet
3+
title: SQL
44
description: My SQL cheatsheet because I forget names and syntax a lot.
55
keywords: ["programming", "postgres", "mysql", "rdbms", "optimization", "cheatsheet"]
66

77
indexTitle: SQL and Common Relational DBMS Features
88
wip: true
99
---
1010

11-
*I am using **Microsoft SQL Server** these days, so this cheatsheet will currently assume you're using it.*
11+
*I am using **Microsoft SQL Server** these days, so this cheatsheet may accidentally assume that you use that. I'll try to specify DBMSes where possible, and otherwise go through and verify DBMS compatibility.*
1212

13-
*I will rework this cheatsheet to be more DBMS-agnostic later.*
13+
*I want to rework this cheatsheet to verify DBMS compatibility later.*
1414

1515

1616
## Resources
1717

1818
References:
1919

20-
- [**Transact-SQL Reference**](https://learn.microsoft.com/en-us/sql/t-sql/language-reference) `(learn.microsoft.com)`
2120
- My theory notes on: [**The Relational Model and Relational Algebra**](/c/notes/databases-relational-model/)
2221
- *I will assume that you are familiar with the basic relational model language from these notes.*
2322

23+
## Basic Statements
2424

25-
## `SELECT` Statements
26-
27-
### Whole Table
25+
### `SELECT` (read)
2826

2927
```sql
30-
SELECT * FROM mytable;
28+
SELECT * FROM MyTable;
3129
```
3230

33-
### Common Clauses
34-
3531
```sql
3632
SELECT
3733
MyCol1,
@@ -44,7 +40,7 @@ GROUP BY
4440
MyCol3
4541
WHERE
4642
MyCol1 = '1969-04-01'
47-
AND MyCol2 in ('mystr1', 'mystr2')
43+
AND MyCol2 IN ('mystr1', 'mystr2')
4844
AND (
4945
MyCol3 <= 4
5046
OR MyCol3 BETWEEN 10 AND 20
@@ -59,13 +55,87 @@ ORDER BY
5955

6056
- `BETWEEN` is all inclusive.
6157
- `ORDER BY` is `ASC` by default if you omit the `ASC`/`DESC`.
62-
- **DISCLAIMER: I'm actually not 100% sure a query like this is entirely correct since I'm just building up a contrived example. I should test it somehow, and then remove this disclaimer when I'm confident it works.**
58+
- **(NOTE: List out aggregate functions?)**
59+
- **(NOTE: I haven't tested the whole query yet.)**
60+
61+
```sql
62+
SELECT *
63+
FROM
64+
MyTable1 AS MyAlias1
65+
LEFT OUTER JOIN MyTable2 AS MyAlias2 ON
66+
MyAlias1.MyCol1 = MyAlias2.MyCol2 AND
67+
MyAlias1.MyCol3 = MyAlias2.MyCol4
68+
WHERE
69+
MyAlias2.MyCol5 IS NULL
70+
;
71+
```
72+
73+
- Alternative joins in place of `LEFT OUTER JOIN`:
74+
- `JOIN` (it's the same as `INNER JOIN`)
75+
- `LEFT JOIN` (it's the same as `LEFT OUTER JOIN`)
76+
- `RIGHT JOIN` (it's the same as `RIGHT OUTER JOIN`)
77+
- `FULL JOIN` (it's the same as `FULL OUTER JOIN`)
78+
- `CROSS JOIN` (this produces the cartesian product of two tables)
79+
- The `ON` keyword is usually invalid syntax for `CROSS JOIN`.
80+
- **(NOTE: I haven't tested all join keywords yet.)**
81+
82+
```sql
83+
SELECT * FROM MyTable1
84+
UNION
85+
SELECT * FROM MyTable2
86+
;
87+
```
88+
89+
- **(NOTE: I haven't tested the union keyword yet.)**
90+
91+
### `INSERT INTO` (insert new rows)
92+
93+
TODO
94+
95+
### `UPDATE` (modify specified rows)
96+
97+
TODO
98+
99+
### `DELETE` (delete specified rows)
100+
101+
TODO
63102

64-
### Joins
103+
## CTEs
65104

66-
(TODO)
105+
TODO
67106

68-
### Unions
107+
## Correlated Subqueries
69108

70-
(TODO)
109+
TODO (it's probably not good to use correlated subqueries, but we should outline it anyway.)
110+
111+
## PostgreSQL
112+
113+
TODO
114+
115+
## Microsoft SQL Server
116+
117+
### Indexes
118+
119+
*(TODO: What's the difference between clustered and nonclustered index? I'm assuming at the moment that both are B-tree family data structures but clustered means the records are basically at the leaves while nonclustered stores references that let you find the record somehow. It could be useful to dig deeper into these details, but for my purposes at the moment, I probably don't need to know.)*
120+
121+
TODO
122+
123+
### Query Optimization
124+
125+
*(TODO: Maybe outline how to use the SSMS UI for this.)*
126+
127+
TODO
128+
129+
References:
130+
131+
- [Logical and physical showplan operator reference](https://learn.microsoft.com/en-us/sql/relational-databases/showplan-logical-and-physical-operators-reference) `(learn.microsoft.com)`
132+
- I found [this playlist](https://www.youtube.com/playlist?list=PL2WDxXzl0Y2BK7JUQ5q5yWdQtrdTuwX5O) useful for learning for the first time.
133+
134+
### Transact-SQL
135+
136+
TODO
137+
138+
References:
139+
140+
- [**Transact-SQL Reference**](https://learn.microsoft.com/en-us/sql/t-sql/language-reference) `(learn.microsoft.com)`
71141

src/pages/c/semiprivate/kubernetes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: "@layouts/MDLayout.astro"
3+
title: Kubernetes Notes
4+
description: I'm trying to learn Kubernetes!
5+
keywords: ["programming", "kubernetes", "k8s"]
6+
---
7+
8+
Useful resources:
9+
10+
- <https://github.com/kelseyhightower/kubernetes-the-hard-way> I should set up a k8s cluster from scratch at least once using this guide. It will probably give a good introduction to the architecture of k8s.
11+

src/pages/c/semiprivate/kubernetes.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/pages/food/list.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import Todo from "@components/Todo";
1010

1111
*These aren't necessarily recommendations. I'm just listing out stuff I've had to keep track of it all.*
1212

13+
*I sometimes try to put in diacritics/accents or native language characters, but I don't speak these languages so I may get it wrong when I do.*
14+
1315
## Sydney, Australia - Restaurants
1416

1517
- **Art Gallery of New South Wales** (Cafe) - CBD
@@ -209,6 +211,11 @@ import Todo from "@components/Todo";
209211
- 2025-01-17 - Chonquing Street Noodles with Wanza Mince and Spicy Soup
210212
- There were a bunch of topping options. I chose Wanza Mince.
211213
- There was the option to get this dry (rather than with soup) and mild (rather than spicy).
214+
- **Pho Gia Hoi** (Vietnamese) - CBD, Haymarket
215+
- **[mains]** 2025-05-09 - Phở Dặc Biệt
216+
- *"Combination Beef Flat Rice Noodle Soup (Medium or Well Done beef, Brisket, Tendon, Beef meatball)"*
217+
- **[entrée]** 2025-05-09 - Cút Rang Muối
218+
- *"Salt & Pepper Quails"*
212219
- **Pho Pasteur** (Vietnamese) - Blacktown
213220
- **RaRa** (Japanese, Ramen) - Redfern
214221
- 2022-06-27 - Tonkotsu Black Garlic Ramen
@@ -265,11 +272,15 @@ import Todo from "@components/Todo";
265272
- White Base; *"Eggplant, Fior DI Latte, Hot Salami, Black Truffle, Parmesan & Basil"*
266273
- **Vienna Sandwiches** (Sandwiches) - North Sydney
267274
- **[sandwich]** 2025-04-16 - Chopin Chicken
268-
- *Grilled Marinated Chicken, Avocado, Swiss Cheese, Tomatoes, Rockets, Lettuce, Lemon-Chive Mayo*
275+
- *"Grilled Marinated Chicken, Avocado, Swiss Cheese, Tomatoes, Rockets, Lettuce, Lemon-Chive Mayo"*
269276
- **YangGuoFu Malatang** (Chinese, Milk Tea, Malatang) - Kingsford
270277
- 2025-01-26 - Pu'er Mochi Milk Tea
271278
- **Yok Yor** (Thai) - CBD, Haymarket
272279
- 2024-06-22 - Pad Thai with Beef
280+
- **Yomie's Rice x Yogurt** (Rice Yoghurt Drinks) - CBD, Haymarket
281+
- **[drink]** 2025-05-09 - Yomie's Purple Rice Yogurt
282+
- *Similar in concept to milk tea with tapioca pearls, just with a drink that tastes like yoghurt (but was definitely a drink and wasn't thick like you might expect) and with purple-coloured rice in it.*
283+
- *Yes, I am aware that I used two different spellings of the word "yoghurt". The store spells it as "yogurt", but I am used to "yoghurt".*
273284

274285
## Sydney, Australia - Food Stalls/Trucks
275286

src/pages/list-of-awesome/index.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const frontmatter = fm({
1313
title: "List of Awesome",
1414
description: "My list of favourite online creators!",
1515
keywords: ["favourite", "list", "awesome"],
16+
17+
hidetoc: true,
1618
});
1719
---
1820

@@ -58,6 +60,7 @@ export const frontmatter = fm({
5860
</li>
5961
<li>[<AYt p="/c/szyzyg" />] <span class="e">Scott Manley</span></li>
6062
<li>[<AYt p="/c/smartereveryday" />] <span class="e">Smarter Every Day</span></li>
63+
<li>[<AYt p="/@SpanningTree" />] <span class="e">Spanning Tree</span></li>
6164
<li>[<AYt p="/user/sciencestatedclearly" />] <span class="e">Stated Clearly</span></li>
6265
<li>[<AYt p="/c/SteveMould" />] <span class="e">Steve Mould</span></li>
6366
<li>[<AYt p="/c/TechnologyConnections" />] <span class="e">Technology Connections</span></li>
@@ -192,6 +195,12 @@ export const frontmatter = fm({
192195
<li>[<AYt p="/user/bryaneasy" />] <span class="e">Tech YES City</span></li>
193196
</ul>
194197

198+
<h2>News and Politics</h2>
199+
200+
<ul>
201+
<li>[<AYt p="/@ABCNewsIndepth" />] <span class="e">ABC News In-depth</span></li>
202+
</ul>
203+
195204
<h2>Uncategorized</h2>
196205

197206
<ul>

src/pages/tech/cheatsheets/emoji.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: "@layouts/MDLayout.astro"
3+
title: Unicode Emoji Templates
4+
description: Emoji I regularly use and constantly have to google for.
5+
keywords: ["emoji", "cheatsheet"]
6+
7+
indexTitle: Emoji
8+
hidetoc: true
9+
---
10+
11+
👀 `:eyes:`
12+
13+
🤔 `:thinking:`
14+

src/pages/tech/cheatsheets/windows-sysadmin.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ choco install firefox
1717
1818
# Update all packages
1919
choco upgrade all
20+
21+
# List all installed packages
22+
choco list
2023
```
2124

2225
## Network Auditing

src/pages/tech/homelab/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ TODO
7777

7878
TODO
7979

80+
### VM: 398 (arch-web-devsite)
81+
82+
TODO
83+
8084
### VM: 399 (debian-virtual-desktop)
8185

8286
TODO

0 commit comments

Comments
 (0)