revamp taxonomies

This commit is contained in:
Michael Zhang 2021-07-06 16:32:34 -05:00
parent 849c0c3bb6
commit 796cb7eb08
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
14 changed files with 76 additions and 28 deletions

View file

@ -3,6 +3,10 @@ languageCode = "en-us"
title = "michael's blog" title = "michael's blog"
enableGitInfo = true enableGitInfo = true
[taxonomies]
tag = "tags"
language = "languages"
[markup.tableOfContents] [markup.tableOfContents]
endLevel = 4 endLevel = 4
ordered = true ordered = true

View file

@ -1,8 +1,6 @@
+++ +++
title = "my new life stack" title = "my new life stack"
date = 2018-02-01 date = 2018-02-01
[taxonomies]
tags = ["arch", "linux", "setup", "computers"] tags = ["arch", "linux", "setup", "computers"]
+++ +++

View file

@ -1,9 +1,8 @@
+++ +++
title = "cleaning up your shell" title = "cleaning up your shell"
date = 2018-02-25 date = 2018-02-25
tags = ["computers", "linux", "terminal"]
[taxonomies] languages = ["bash"]
tags = ["computers", "linux", "bash", "terminal"]
+++ +++
Is your shell loading slower than it used to? Maybe you've been sticking a bit more into your `.bashrc`/`.zshrc` than you thought. Is your shell loading slower than it used to? Maybe you've been sticking a bit more into your `.bashrc`/`.zshrc` than you thought.

View file

@ -1,9 +1,7 @@
+++ +++
title = "fixing tmux colors" title = "fixing tmux colors"
date = 2018-04-23 date = 2018-04-23
tags = ["computers"]
[taxonomies]
tags = ["computers", "terminal"]
+++ +++
Put this in your `~/.tmux.conf`. Put this in your `~/.tmux.conf`.

View file

@ -1,9 +1,8 @@
+++ +++
title = "web apps" title = "web apps"
date = 2018-05-28 date = 2018-05-28
tags = ["computers", "web", "rant", "things-that-are-bad"]
[taxonomies] languages = ["javascript"]
tags = ["computers", "javascript", "web-dev", "rant", "things-that-are-bad"]
+++ +++
The other day, I just turned off JavaScript from my browser. "fucking neckbeard", "you'll turn it back in 2 weeks", "living without JavaScript is like living without electricity" were some of the responses I got. And they might be right. But let's see why things are the way they are and what we can do about it. The other day, I just turned off JavaScript from my browser. "fucking neckbeard", "you'll turn it back in 2 weeks", "living without JavaScript is like living without electricity" were some of the responses I got. And they might be right. But let's see why things are the way they are and what we can do about it.

View file

@ -2,9 +2,8 @@
title = "twenty years of attacks on rsa with examples" title = "twenty years of attacks on rsa with examples"
date = 2018-10-26 date = 2018-10-26
toc = true toc = true
tags = ["crypto"]
[taxonomies] languages = ["python"]
tags = ["math", "crypto", "python"]
+++ +++
## 1. introduction ## 1. introduction

View file

@ -1,9 +1,8 @@
+++ +++
title = "magic forms with proc macros: ideas" title = "magic forms with proc macros: ideas"
date = 2019-02-01 date = 2019-02-01
tags = ["computers", "web"]
[taxonomies] languages = ["rust"]
tags = ["computers", "rust", "web-dev", "macros"]
+++ +++
Procedural macros (proc macros for short) in Rust are incredible because they allow pre-compile source transformation. Many of the greatest abstractions in Rust take advantage of this feature. For example, you can Procedural macros (proc macros for short) in Rust are incredible because they allow pre-compile source transformation. Many of the greatest abstractions in Rust take advantage of this feature. For example, you can

View file

@ -1,8 +1,6 @@
+++ +++
title = "accept server analogy" title = "accept server analogy"
date = 2019-03-04 date = 2019-03-04
[taxonomies]
tags = ["computers"] tags = ["computers"]
+++ +++

View file

@ -1,8 +1,6 @@
+++ +++
title = "password managers" title = "password managers"
date = 2020-04-01 date = 2020-04-01
[taxonomies]
tags = ["computers", "things-that-are-good", "privacy"] tags = ["computers", "things-that-are-good", "privacy"]
+++ +++

View file

@ -1,9 +1,7 @@
+++ +++
title = "email tracking links" title = "email tracking links"
date = 2021-06-17 date = 2021-06-17
tags = ["email", "rant", "computers", "things-that-are-bad", "privacy"]
[taxonomies]
tags = ["email", "computers", "things-that-are-bad", "privacy"]
+++ +++
You probably get emails every day, and spend a lot of time reading them. And You probably get emails every day, and spend a lot of time reading them. And

View file

@ -3,9 +3,8 @@ title = "sending https requests from scratch"
date = 2021-07-05 date = 2021-07-05
draft = true draft = true
toc = true toc = true
tags = ["computers", "web", "crypto"]
[taxonomies] languages = ["python"]
tags = ["computers", "web", "python"]
+++ +++
The web is [so complicated][4] these days, I began wondering exactly how big of a feat it would be to formally verify everything. At this point I realized all I knew about web protocols were from fiddling around with HTTP 1.0 requests from doing CTFs in the past. You'd pop open a socket to wherever you wanted, stick `GET` and then whatever path you wanted, and then add a version number at the end. The web is [so complicated][4] these days, I began wondering exactly how big of a feat it would be to formally verify everything. At this point I realized all I knew about web protocols were from fiddling around with HTTP 1.0 requests from doing CTFs in the past. You'd pop open a socket to wherever you wanted, stick `GET` and then whatever path you wanted, and then add a version number at the end.
@ -394,7 +393,35 @@ print("res", res)
### Encrypted tunnel ### Encrypted tunnel
Now we should be ready to communicate with the server through our encrypted tunnel. But we forgot to keep around our key negotiation parameters! How will we encrypt our communication? Let's go back and update these functions to let us keep the parameters, and then we can move on to implementing some of these crypto algorithms. Now we should be ready to communicate with the server through our encrypted tunnel. But we forgot to keep around our key negotiation parameters! How will we encrypt our communication? Let's go back and update these functions to let us keep the parameters, using the crypto functions we just defined.
The key sharing function:
```py
def ext_key_share(Q):
kex = b"\x04" + Q.x + Q.y
key_share = struct.pack(">H", 23) + struct.pack(">H", len(kex)) + kex
ext = struct.pack(">H", len(key_share)) + key_share
return (struct.pack(">H", 51) # code number for alpn
+ struct.pack(">H", len(ext))
+ ext)
```
Finally, the new `client_hello_extensions`:
```py
def client_hello_extensions(hostname: str):
d, Q = ecdsa_keypair()
data = b"".join([
ext_supported_versions(),
ext_signature_algorithms(),
ext_supported_groups(),
ext_key_share(Q),
ext_server_name(hostname),
ext_alpn(),
])
return (data, d, Q)
```
## HTTP 2 ## HTTP 2

View file

@ -1,5 +1,7 @@
{{- define "content" -}} {{- define "content" -}}
hellosu
{{ .Content }} {{ .Content }}
{{- end -}} {{- end -}}

View file

@ -4,4 +4,12 @@
{{ partial "post-list" $posts }} {{ partial "post-list" $posts }}
<hr />
<small>
List of posts by:
<a href="/languages">[languages]</a> &middot;
<a href="/tags">[tags]</a>
</small>
{{- end -}} {{- end -}}

View file

@ -0,0 +1,21 @@
{{- define "content" -}}
<h1>{{ .Name }}</h1>
<ul>
{{- range $name, $value := sort .Data.Pages "Title" -}}
<li style="margin-bottom: 15px;">
<a href="{{ $value.RelPermalink }}">{{ $value.Title }}</a>
({{ len $value.Pages }})
<br />
<small>
{{- range $index, $page := $value.Pages -}}
{{ if $index }},{{ end }}
<a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
{{- end -}}
</small>
</li>
{{- end -}}
</ul>
{{- end -}}