mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-21 15:56:29 -05:00
Added medium syndication metadata
This commit is contained in:
parent
a51e20fbc7
commit
a22bb998cb
14 changed files with 78 additions and 68 deletions
|
@ -1,11 +1,14 @@
|
|||
---
|
||||
title: "Antenna Basics"
|
||||
date: 2021-07-25T10:43:11-04:00
|
||||
date: 2021-07-25 14:43:11
|
||||
draft: false
|
||||
tags: ["Amateur Radio"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: fdec15d43776
|
||||
tags:
|
||||
- Amateur Radio
|
||||
title: Antenna Basics
|
||||
---
|
||||
|
||||
When a radio wave hits an antenna, the electrical component of the wave induces a difference of potential in the conductor which gives rise to an electric current. This is called electromotive force. The current induced is normally small, therefore, we usually design antennas to be as efficient as possible.
|
||||
|
||||
Ways to increase efficiency:
|
||||
|
@ -14,5 +17,4 @@ Ways to increase efficiency:
|
|||
- If there is a power line nearby, run the antenna at a right angle to that wire to decrease interference.
|
||||
- Make the antenna resonant at the frequency you're interested in. You can do this by adjusting the length of the wire, inductance, capacitance.
|
||||
- Design the antenna so that it focuses the energy from the direction you care about, as opposed to listening equally in all directions.
|
||||
- Similarly, raise the antenna higher off the ground so that more of it's beam pattern reaches the horizon.
|
||||
|
||||
- Similarly, raise the antenna higher off the ground so that more of it's beam pattern reaches the horizon.
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: "Comparator Logic Gate"
|
||||
date: 2021-06-18T01:09:45-04:00
|
||||
date: 2021-06-18 05:09:45
|
||||
draft: false
|
||||
tags: []
|
||||
math: true
|
||||
medium_enabled: true
|
||||
medium_post_id: 7bbc125ead40
|
||||
tags: []
|
||||
title: Comparator Logic Gate
|
||||
---
|
||||
|
||||
This post is heavily derived from the Wikipedia post on [Digital Comparators](https://en.wikipedia.org/wiki/Digital_comparator) and therefore can be distributed under the Creative Commons Attribution-ShareAlike 3.0 license.
|
||||
|
@ -52,4 +53,4 @@ The only way for this to evaluate to true is if A is 1 and B is 0. That is $(A >
|
|||
To compare an entire bitstring, we start from the most significant bit and check to see if one bit is greater than the other. If not, it will then check the next bit while confirming that all the previous bits were the same. For a 3-bit comparator, the logic will look like the following:
|
||||
$$
|
||||
(A_3A_2A_1 > B_3 B_2 B_1) \equiv A_3\bar{B_3} + \overline{(A_3 \oplus B_3)}A_2\bar{B_2} + \overline{(A_3 \oplus B_3)}\overline{(A_2 \oplus B_2)}A_1\bar{B_1}
|
||||
$$
|
||||
$$
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: "Convert DJVU to PDF"
|
||||
date: 2021-08-27T22:00:00-04:00
|
||||
date: 2021-08-28 02:00:00
|
||||
draft: false
|
||||
tags: []
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: ddf23ae64f9a
|
||||
tags: []
|
||||
title: Convert DJVU to PDF
|
||||
---
|
||||
|
||||
I've recently come across the DJVU file format before and needed to convert it to a PDF. The most reliable way I've found to do it is via the following command.
|
||||
|
@ -42,5 +43,4 @@ if ! command -v ps2pdf > /dev/null ; then
|
|||
fi
|
||||
|
||||
djvups "$1" | ps2pdf - "${1%.*}.pdf"
|
||||
```
|
||||
|
||||
```
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: "Do-While Loop in Other Languages"
|
||||
date: 2021-08-27T21:50:02-04:00
|
||||
date: 2021-08-28 01:50:02
|
||||
draft: false
|
||||
tags: []
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 5a9c792673f2
|
||||
tags: []
|
||||
title: Do-While Loop in Other Languages
|
||||
---
|
||||
|
||||
Some languages like C, C++, and Java have a concept of a Do-While loop which normally look like the following:
|
||||
|
@ -22,6 +23,4 @@ first_run = True
|
|||
while condition or first_run:
|
||||
first_run = False
|
||||
statements
|
||||
```
|
||||
|
||||
|
||||
```
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Introduction to RF Power Amplifiers"
|
||||
date: 2021-04-10T13:01:00-04:00
|
||||
date: 2021-04-10 17:01:00
|
||||
draft: false
|
||||
tags: ["Amateur Radio"]
|
||||
math: true
|
||||
medium_enabled: true
|
||||
medium_post_id: a8510ebe7754
|
||||
tags:
|
||||
- Amateur Radio
|
||||
title: Introduction to RF Power Amplifiers
|
||||
---
|
||||
|
||||
For field day I've been toying with the idea of buying a power amplifier for my HackRF. What I've come to realize is that there are a lot more to power amplifiers than just how much it amplifies by. This post outlines my current understanding (I'm by no means an expert) on the subject of RF power amplifiers.
|
||||
|
@ -60,6 +62,4 @@ Considerations:
|
|||
|
||||
- Need a gain of 30dB
|
||||
- Lower noise figure is always better but a link budget analysis would get you a specific number.
|
||||
- Want VSWR as close to 1 as possible.
|
||||
|
||||
|
||||
- Want VSWR as close to 1 as possible.
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Lean Theorem Prover Tactics"
|
||||
date: 2021-10-10T23:52:41-04:00
|
||||
date: 2021-10-11 03:52:41
|
||||
draft: false
|
||||
tags: ["Formal Methods"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: adea1a69ddc8
|
||||
tags:
|
||||
- Formal Methods
|
||||
title: Lean Theorem Prover Tactics
|
||||
---
|
||||
|
||||
I've recently been playing with the Lean Theorem Prover. I am impressed with how some of the mathematics community decided to extend this project via [mathlib](https://leanprover-community.github.io/) and really make proving theorems in this framework easy and enjoyable.
|
||||
|
@ -284,4 +286,4 @@ end
|
|||
Documentation: https://leanprover-community.github.io/mathlib_docs/tactics.html#linarith
|
||||
|
||||
## Conclusion
|
||||
A common pattern of writing proofs for me is to use a combination of `hint` and `have` with `library_search`. Especially when you are not an expert in a theorem prover, it's nice to have the system fill in some of the simpler steps. I generally prefer tactics that give you a list of simpler tactics back as opposed to solving the goal in the background without any proof. Regardless, I'm glad that many of these decision procedures exist to help me deal with what can sometimes be the verbosity of theorem proving.
|
||||
A common pattern of writing proofs for me is to use a combination of `hint` and `have` with `library_search`. Especially when you are not an expert in a theorem prover, it's nice to have the system fill in some of the simpler steps. I generally prefer tactics that give you a list of simpler tactics back as opposed to solving the goal in the background without any proof. Regardless, I'm glad that many of these decision procedures exist to help me deal with what can sometimes be the verbosity of theorem proving.
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
title: "Netboot.xyz Bootloader"
|
||||
date: 2021-06-18T15:43:29-04:00
|
||||
date: 2021-06-18 19:43:29
|
||||
draft: false
|
||||
tags: []
|
||||
medium_enabled: true
|
||||
medium_post_id: d99cafd95a34
|
||||
tags: []
|
||||
title: Netboot.xyz Bootloader
|
||||
---
|
||||
|
||||
Instead of manually loading ISOs onto a USB stick for [Ventoy](/blog/ventoy) to display, we can use Netboot.xyz to present us a list of options and download them during boot. This requires an internet connection in order to work.
|
||||
|
@ -14,5 +15,4 @@ Download the [Netboot ISO](https://boot.netboot.xyz/ipxe/netboot.xyz.iso) and [l
|
|||
|
||||
![](/files/images/blog/netboot.xyz.gif)
|
||||
|
||||
Another benefit of this approach over Ventoy is that we don't have to manually update the flash drive. It always comes fresh with the ISOs available on their website.
|
||||
|
||||
Another benefit of this approach over Ventoy is that we don't have to manually update the flash drive. It always comes fresh with the ISOs available on their website.
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: "Common Network Debugging Commands"
|
||||
date: 2022-01-02T15:17:02-05:00
|
||||
date: 2022-01-02 20:17:02
|
||||
draft: false
|
||||
tags: ["Networking"]
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 7a55c1f5f40e
|
||||
tags:
|
||||
- Networking
|
||||
title: Common Network Debugging Commands
|
||||
---
|
||||
|
||||
Below are list of commands that I use to debug common issues in a network. There is a wonderful tool called Wireshark which you can use to sniff packets in a network and filter by a wide range of options, but we'll mainly focus on simple tools that you can use in the terminal.
|
||||
|
@ -157,5 +159,4 @@ Address HWtype HWaddress Flags Mask Iface
|
|||
192.168.0.1 ether 10:1d:b1:1d:1f:91 C wlan0
|
||||
192.168.0.11 ether 72:25:22:2c:72:72 C wlan0
|
||||
192.168.0.111 ether 03:33:34:3b:23:39 C wlan0
|
||||
```
|
||||
|
||||
```
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
title: "Parallel SCP with LFTP"
|
||||
date: 2021-07-25T10:38:43-04:00
|
||||
date: 2021-07-25 14:38:43
|
||||
draft: false
|
||||
tags: []
|
||||
math: false
|
||||
medium_enabled: true
|
||||
medium_post_id: 610d337c8783
|
||||
tags: []
|
||||
title: Parallel SCP with LFTP
|
||||
---
|
||||
|
||||
Segmented file transfer allows you to split up a file into multiple chunks and download them in parallel. There is a program written for Linux called LFTP which can accomplish this task and supports FTP, HTTP, SFTP, BitTorrent, among others. The syntax is a little funky, so I wrote a wrapper I call `pget` which allows for segmented file transfers using SCP.
|
||||
|
||||
Usage:
|
||||
|
@ -58,5 +60,4 @@ fi
|
|||
|
||||
LFTP_COMMAND="pget -n $NUM_SEGMENTS $FILE_LOCATION;bye"
|
||||
lftp -e "$LFTP_COMMAND" sftp://"$REMOTE_HOST"
|
||||
```
|
||||
|
||||
```
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
title: "Print Statements with Frame Information"
|
||||
date: 2021-06-03T13:54:39-04:00
|
||||
date: 2021-06-03 17:54:39
|
||||
draft: false
|
||||
tags: ["Testing"]
|
||||
medium_enabled: true
|
||||
medium_post_id: a811c52bda55
|
||||
tags:
|
||||
- Testing
|
||||
title: Print Statements with Frame Information
|
||||
---
|
||||
|
||||
I find it extremely useful to include frame information such as filename, line number, and current function in my print statements. Here's a couple ways that I've done that in the past.
|
||||
|
@ -36,5 +38,4 @@ def debuglog(m):
|
|||
lineno = last_frame_info.lineno if last_frame_info is not None else 1
|
||||
function_name = last_frame_info.function if last_frame_info is not None else "<module>"
|
||||
print(f"[{filename}:{lineno} {function_name}] {m}")
|
||||
```
|
||||
|
||||
```
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
title: "Forward Packets with Socat"
|
||||
date: 2021-06-18T19:38:43-04:00
|
||||
date: 2021-06-18 23:38:43
|
||||
draft: false
|
||||
tags: ["Networking"]
|
||||
medium_enabled: true
|
||||
medium_post_id: 790558856bee
|
||||
tags:
|
||||
- Networking
|
||||
title: Forward Packets with Socat
|
||||
---
|
||||
|
||||
I've written about relaying TCP traffic using [SSH port forwarding](/blog/sshlocalportforwarding/). Though sometimes you don't require the authenticity and encryption of SSH or want to use another protocol such as UDP. That's where `socat` comes in.
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
title: "Terminal Output in Vim"
|
||||
date: 2021-06-18T16:22:30-04:00
|
||||
date: 2021-06-18 20:22:30
|
||||
draft: false
|
||||
tags: []
|
||||
medium_enabled: true
|
||||
medium_post_id: fba948955d22
|
||||
tags: []
|
||||
title: Terminal Output in Vim
|
||||
---
|
||||
|
||||
In Vim you can output the result of a command below your cursor by using `:r!`.
|
||||
|
@ -22,5 +23,4 @@ The current timestamp
|
|||
:r! echo "[$(date '+\%Y-\%m-\%d \%H:\%M:\%S')]"
|
||||
```
|
||||
|
||||
Outputs: `[2021-06-18 16:13:19]`
|
||||
|
||||
Outputs: `[2021-06-18 16:13:19]`
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
title: "Ventoy for managing ISOs on one USB"
|
||||
date: 2021-06-18T15:32:38-04:00
|
||||
date: 2021-06-18 19:32:38
|
||||
draft: false
|
||||
tags: ["Virtualization"]
|
||||
medium_enabled: true
|
||||
medium_post_id: b096fed9be3c
|
||||
tags:
|
||||
- Virtualization
|
||||
title: Ventoy for managing ISOs on one USB
|
||||
---
|
||||
|
||||
Traditionally I would hold one Linux distribution per USB drive. Though with 32 GB USB Flash drives only costing $12, why hold only one per drive? That's where Ventoy comes in. With Ventoy, we can store multiple ISOs which it then presents as a boot screen.
|
||||
|
@ -20,5 +22,4 @@ To install Ventoy onto a flash drive, follow the [Get Started](https://www.vento
|
|||
|
||||
![](/files/images/blog/ventoy.png)
|
||||
|
||||
Example screenshot from their website.
|
||||
|
||||
Example screenshot from their website.
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: "Z3 Constraint solving"
|
||||
date: 2021-06-18T00:53:20-04:00
|
||||
date: 2021-06-18 04:53:20
|
||||
draft: false
|
||||
math: true
|
||||
tags: []
|
||||
medium_enabled: true
|
||||
medium_post_id: 9e4ced42d47
|
||||
tags: []
|
||||
title: Z3 Constraint solving
|
||||
---
|
||||
|
||||
I've been looking for an easy to use constraint solver for a while and recently I've landed on using the python bindings for the SMT solver Z3.
|
||||
|
@ -43,5 +44,4 @@ s.check()
|
|||
m = s.model()
|
||||
x_val = m.eval(x)
|
||||
y_val = m.eval(y)
|
||||
```
|
||||
|
||||
```
|
Loading…
Reference in a new issue