mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-25 01:26:30 -05:00
Added medium syndication metadata
This commit is contained in:
parent
79329aae66
commit
387dd491b1
30 changed files with 175 additions and 134 deletions
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Code in LaTex Beamer"
|
date: 2022-01-26 23:11:37-05:00
|
||||||
date: 2022-01-26T23:11:37-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["LaTex"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: d91f704bb53a
|
||||||
|
tags:
|
||||||
|
- LaTex
|
||||||
|
title: Code in LaTex Beamer
|
||||||
---
|
---
|
||||||
|
|
||||||
I commonly use the [`listings` package](/blog/latexcode/) to showcase code in my LaTex documents. I tried doing the same in my Beamer slidedecks and I ran into an issue where the LaTex source code failed to compile. After digging around, I figured out its because every slide or frame that includes code (or any verbatim environment) needs to be marked as `fragile`. A minimal example is presented below:
|
I commonly use the [`listings` package](/blog/latexcode/) to showcase code in my LaTex documents. I tried doing the same in my Beamer slidedecks and I ran into an issue where the LaTex source code failed to compile. After digging around, I figured out its because every slide or frame that includes code (or any verbatim environment) needs to be marked as `fragile`. A minimal example is presented below:
|
||||||
|
@ -33,4 +35,3 @@ I commonly use the [`listings` package](/blog/latexcode/) to showcase code in my
|
||||||
\end{frame}
|
\end{frame}
|
||||||
\end{document}
|
\end{document}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Code alongside Output in LaTex"
|
date: 2022-01-27 09:15:10-05:00
|
||||||
date: 2022-01-27T09:15:10-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["LaTex"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: c4d061953056
|
||||||
|
tags:
|
||||||
|
- LaTex
|
||||||
|
title: Code alongside Output in LaTex
|
||||||
---
|
---
|
||||||
|
|
||||||
Working on a tool paper, I had the desire to share code alongside its output. With a combination of the `listings`, `caption`, and `color` packages, we can get a result that's nice looking.
|
Working on a tool paper, I had the desire to share code alongside its output. With a combination of the `listings`, `caption`, and `color` packages, we can get a result that's nice looking.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Dafny v3.3 Show Countermodel"
|
date: 2022-02-04 19:43:12-05:00
|
||||||
date: 2022-02-04T19:43:12-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Formal Methods"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: b1976dcfde09
|
||||||
|
tags:
|
||||||
|
- Formal Methods
|
||||||
|
title: Dafny v3.3 Show Countermodel
|
||||||
---
|
---
|
||||||
|
|
||||||
*Warning: `extractcounterexample` is a new flag in Dafny and the command to extract it will likely change*
|
*Warning: `extractcounterexample` is a new flag in Dafny and the command to extract it will likely change*
|
||||||
|
@ -103,4 +105,3 @@ Dafny program verifier finished with 2 verified, 0 errors
|
||||||
Compiled assembly into example3.dll
|
Compiled assembly into example3.dll
|
||||||
Program compiled successfully
|
Program compiled successfully
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Reasoning through Loops in Dafny"
|
date: 2022-02-05 00:22:58-05:00
|
||||||
date: 2022-02-05T00:22:58-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Formal Methods"]
|
|
||||||
math: true
|
math: true
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: c0e16f8cd368
|
||||||
|
tags:
|
||||||
|
- Formal Methods
|
||||||
|
title: Reasoning through Loops in Dafny
|
||||||
---
|
---
|
||||||
|
|
||||||
Dafny treats loops like a black box. It could be annoying the first time you experience this and have no clue why the code is not verifying properly. There are two properties that Dafny needs you to prove: partial correctness and termination. Together these form *total correctness*.
|
Dafny treats loops like a black box. It could be annoying the first time you experience this and have no clue why the code is not verifying properly. There are two properties that Dafny needs you to prove: partial correctness and termination. Together these form *total correctness*.
|
||||||
|
@ -112,6 +114,3 @@ method fact(x: int) returns (y: int)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Docker Secrets"
|
date: 2022-02-04 23:59:13-05:00
|
||||||
date: 2022-02-04T23:59:13-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Containers"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 58cc9e00b1a7
|
||||||
|
tags:
|
||||||
|
- Containers
|
||||||
|
title: Docker Secrets
|
||||||
---
|
---
|
||||||
|
|
||||||
I try to keep secrets such as passwords and keys out in their own separate files so that I can `.gitignore` them and commit the rest of my configuration. With `docker-compose` we can do that with the `env_file` field. Here is an example with a postgres configuration:
|
I try to keep secrets such as passwords and keys out in their own separate files so that I can `.gitignore` them and commit the rest of my configuration. With `docker-compose` we can do that with the `env_file` field. Here is an example with a postgres configuration:
|
||||||
|
@ -27,4 +29,3 @@ POSTGRES_USER=user
|
||||||
POSTGRES_PASSWORD=389ed93045c84cc0828c4310e6ef76ce
|
POSTGRES_PASSWORD=389ed93045c84cc0828c4310e6ef76ce
|
||||||
POSTGRES_DB=database
|
POSTGRES_DB=database
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Finding Cool People on Mastodon"
|
date: 2022-05-15 20:39:35-04:00
|
||||||
date: 2022-05-15T20:39:35-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Mastodon"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 50c97fc8aa3c
|
||||||
|
tags:
|
||||||
|
- Mastodon
|
||||||
|
title: Finding Cool People on Mastodon
|
||||||
---
|
---
|
||||||
|
|
||||||
Mastodon is a cool federated micro-blogging platform that can serve as an alternative to Twitter. One of its primary features is that it shows what they call toots from only people you follow in reverse-chronological order. Nowadays, large tech companies employ recommendation engines to surface content from users (you don't even need to follow) in a non-chronological order driven by the number of interactions users similar to you had with the content. The lack of recommendation engine in Mastodon can be a blessing as low-quality emotional content tends to drive more interactions. However, this can also be a curse as cool new people don't naturally surface in your feed. The following are the techniques I employ to consistently seek out cool new people:
|
Mastodon is a cool federated micro-blogging platform that can serve as an alternative to Twitter. One of its primary features is that it shows what they call toots from only people you follow in reverse-chronological order. Nowadays, large tech companies employ recommendation engines to surface content from users (you don't even need to follow) in a non-chronological order driven by the number of interactions users similar to you had with the content. The lack of recommendation engine in Mastodon can be a blessing as low-quality emotional content tends to drive more interactions. However, this can also be a curse as cool new people don't naturally surface in your feed. The following are the techniques I employ to consistently seek out cool new people:
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Finding Cuda Errors"
|
date: 2022-03-08 10:53:43-05:00
|
||||||
date: 2022-03-08T10:53:43-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: []
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: a07f460ce553
|
||||||
|
tags: []
|
||||||
|
title: Finding Cuda Errors
|
||||||
---
|
---
|
||||||
|
|
||||||
When cuda fails, it fails silently. To combat this, I have gotten into a habit of checking for a failed status for every cuda memory allocation, kernel execution etc. The following is a C++ macro I wrote that checks if a previous cuda call has failed and then prints the current line and file of the macro.
|
When cuda fails, it fails silently. To combat this, I have gotten into a habit of checking for a failed status for every cuda memory allocation, kernel execution etc. The following is a C++ macro I wrote that checks if a previous cuda call has failed and then prints the current line and file of the macro.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Which commit broke the build? Using Git Bisect"
|
date: 2022-05-03 01:15:55-04:00
|
||||||
date: 2022-05-03T01:15:55-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Git"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 1ef72415ab75
|
||||||
|
tags:
|
||||||
|
- Git
|
||||||
|
title: Which commit broke the build? Using Git Bisect
|
||||||
---
|
---
|
||||||
|
|
||||||
Lets imagine a scenario where in the latest merge a test
|
Lets imagine a scenario where in the latest merge a test
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Git Diff by Words"
|
date: 2022-02-04 21:23:30-05:00
|
||||||
date: 2022-02-04T21:23:30-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Git"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 1fa7eb8ae0f5
|
||||||
|
tags:
|
||||||
|
- Git
|
||||||
|
title: Git Diff by Words
|
||||||
---
|
---
|
||||||
|
|
||||||
When working in LaTex it is often more useful to see the changes by words as opposed to lines. Luckily, it's pretty easy to view this in the terminal.
|
When working in LaTex it is often more useful to see the changes by words as opposed to lines. Luckily, it's pretty easy to view this in the terminal.
|
||||||
|
@ -12,4 +14,3 @@ When working in LaTex it is often more useful to see the changes by words as opp
|
||||||
```bash
|
```bash
|
||||||
git diff --color-words
|
git diff --color-words
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Git Partial Clones"
|
date: 2022-02-07 17:07:08-05:00
|
||||||
date: 2022-02-07T17:07:08-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Git"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 95d4bd60af72
|
||||||
|
tags:
|
||||||
|
- Git
|
||||||
|
title: Git Partial Clones
|
||||||
---
|
---
|
||||||
|
|
||||||
I recently was introduced to [Sparse Directories in SVN](https://svnbook.red-bean.com/en/1.8/svn.advanced.sparsedirs.html). In SVN, you can initially clone a repository and have it be empty until you checkout the specific files needed. I wondered if I can do the same with `git`. For the *tl;dr* skip to the conclusion section.
|
I recently was introduced to [Sparse Directories in SVN](https://svnbook.red-bean.com/en/1.8/svn.advanced.sparsedirs.html). In SVN, you can initially clone a repository and have it be empty until you checkout the specific files needed. I wondered if I can do the same with `git`. For the *tl;dr* skip to the conclusion section.
|
||||||
|
@ -120,4 +122,3 @@ You can even set it so that a specific folder is shown at the root of your direc
|
||||||
```bash
|
```bash
|
||||||
git sparse-checkout set FOLDERNAME
|
git sparse-checkout set FOLDERNAME
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Intensional Logic Extends First Order"
|
date: 2022-02-26 20:33:38-05:00
|
||||||
date: 2022-02-26T20:33:38-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: []
|
|
||||||
math: true
|
math: true
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 8e07b68aa8f5
|
||||||
|
tags: []
|
||||||
|
title: Intensional Logic Extends First Order
|
||||||
---
|
---
|
||||||
|
|
||||||
The second brightest object in the sky is known as the morgensteorra (morning star) and æfensteorra (evening star). Later on this object became known as Venus. [(Wikipedia)](https://en.wikipedia.org/wiki/Venus_in_culture)
|
The second brightest object in the sky is known as the morgensteorra (morning star) and æfensteorra (evening star). Later on this object became known as Venus. [(Wikipedia)](https://en.wikipedia.org/wiki/Venus_in_culture)
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "JUnit Script"
|
date: 2022-02-26 20:02:53-05:00
|
||||||
date: 2022-02-26T20:02:53-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Java"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 7ca070e54955
|
||||||
|
tags:
|
||||||
|
- Java
|
||||||
|
title: JUnit Script
|
||||||
---
|
---
|
||||||
|
|
||||||
Running a JUnit test on the terminal is a little annoying. Here is a quick script to make it easier, make it executable and drop it in [`~/.local/bin`](/blog/customexec/) for easy use.
|
Running a JUnit test on the terminal is a little annoying. Here is a quick script to make it easier, make it executable and drop it in [`~/.local/bin`](/blog/customexec/) for easy use.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "LaTex List Labels"
|
date: 2022-01-16 23:17:51-05:00
|
||||||
date: 2022-01-16T23:17:51-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["LaTex"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: b978cbe10da3
|
||||||
|
tags:
|
||||||
|
- LaTex
|
||||||
|
title: LaTex List Labels
|
||||||
---
|
---
|
||||||
|
|
||||||
A quick tip that I recently learned is that the symbols in a LaTex list item is changeable. In fact, the following technique works for both the `enumerate` and `itemize` environments.
|
A quick tip that I recently learned is that the symbols in a LaTex list item is changeable. In fact, the following technique works for both the `enumerate` and `itemize` environments.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Multi-Column slides in Beamer"
|
date: 2022-01-26 23:29:31-05:00
|
||||||
date: 2022-01-26T23:29:31-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["LaTex"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: cd19b12d502f
|
||||||
|
tags:
|
||||||
|
- LaTex
|
||||||
|
title: Multi-Column slides in Beamer
|
||||||
---
|
---
|
||||||
|
|
||||||
When creating slides in LaTex Beamer, it can be frustrating to not have the easy ability to drag text boxes around. Luckily, creating a multi-column layout in Beamer is not difficult! Below is an example of a two column slide layout, where the left side is a bulleted list, and the right side is an image:
|
When creating slides in LaTex Beamer, it can be frustrating to not have the easy ability to drag text boxes around. Luckily, creating a multi-column layout in Beamer is not difficult! Below is an example of a two column slide layout, where the left side is a bulleted list, and the right side is an image:
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Networkx Random Sample Graph"
|
date: 2022-04-07 19:48:12-04:00
|
||||||
date: 2022-04-07T19:48:12-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Python"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: e5c5330cc9a7
|
||||||
|
tags:
|
||||||
|
- Python
|
||||||
|
title: Networkx Random Sample Graph
|
||||||
---
|
---
|
||||||
|
|
||||||
I've been working on several algorithms in `networkx`. In order to speed up testing, especially on large graphs, I've been randomly sampling portions of the original graph. The best way I've found to do this is through the following python snippet:
|
I've been working on several algorithms in `networkx`. In order to speed up testing, especially on large graphs, I've been randomly sampling portions of the original graph. The best way I've found to do this is through the following python snippet:
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Tree-based Plots in NetworkX"
|
date: 2022-01-02 20:36:41-05:00
|
||||||
date: 2022-01-02T20:36:41-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Python"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: c8cffb5c4078
|
||||||
|
tags:
|
||||||
|
- Python
|
||||||
|
title: Tree-based Plots in NetworkX
|
||||||
---
|
---
|
||||||
|
|
||||||
A graph in D3 and NetworkX can be represented as a JSON file.
|
A graph in D3 and NetworkX can be represented as a JSON file.
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Reducing Network Bandwidth in Nginx with Gzip"
|
date: 2022-02-04 20:06:50-05:00
|
||||||
date: 2022-02-04T20:06:50-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: []
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: ebd510dbf691
|
||||||
|
tags: []
|
||||||
|
title: Reducing Network Bandwidth in Nginx with Gzip
|
||||||
---
|
---
|
||||||
|
|
||||||
Browsers that support gzip compression send the header `Accept-Encoding: gzip` in its request and if the webserver supports gzip, then it can send the website data back compressed. Though recently I learned that this isn't setup by default in `nginx`! This post will go over the configuration you'll need to add to `/etc/nginx/nginx.conf` in order to support `gzip` compression. From my experience, enabling `gzip` compression reduced network traffic by 1/4.
|
Browsers that support gzip compression send the header `Accept-Encoding: gzip` in its request and if the webserver supports gzip, then it can send the website data back compressed. Though recently I learned that this isn't setup by default in `nginx`! This post will go over the configuration you'll need to add to `/etc/nginx/nginx.conf` in order to support `gzip` compression. From my experience, enabling `gzip` compression reduced network traffic by 1/4.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Non-Root Systemd Scripts"
|
date: 2022-03-15 23:55:19-04:00
|
||||||
date: 2022-03-15T23:55:19-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Linux"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: f527d0f12fb8
|
||||||
|
tags:
|
||||||
|
- Linux
|
||||||
|
title: Non-Root Systemd Scripts
|
||||||
---
|
---
|
||||||
|
|
||||||
I know of two ways to run systemd services not as root. They both have their pros and cons associated with them.
|
I know of two ways to run systemd services not as root. They both have their pros and cons associated with them.
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "OpenMPI on Fedora"
|
date: 2022-05-03 00:52:38-04:00
|
||||||
date: 2022-05-03T00:52:38-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Fedora"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 1c0c98b99e8a
|
||||||
|
tags:
|
||||||
|
- Fedora
|
||||||
|
title: OpenMPI on Fedora
|
||||||
---
|
---
|
||||||
|
|
||||||
To use use the OpenMPI compilers (mpicc, mpic++, etc.) and mpirun
|
To use use the OpenMPI compilers (mpicc, mpic++, etc.) and mpirun
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Permission Denied: Writing to Privileged Locations"
|
date: 2022-04-07 20:09:40-04:00
|
||||||
date: 2022-04-07T20:09:40-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: []
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 7d133254be3f
|
||||||
|
tags: []
|
||||||
|
title: 'Permission Denied: Writing to Privileged Locations'
|
||||||
---
|
---
|
||||||
|
|
||||||
Perhaps you've tried something like the following:
|
Perhaps you've tried something like the following:
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Program Verification with Hoare Logic and Dafny"
|
date: 2022-02-05 00:06:42-05:00
|
||||||
date: 2022-02-05T00:06:42-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Formal Methods"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 4cf20da7d8a4
|
||||||
|
tags:
|
||||||
|
- Formal Methods
|
||||||
|
title: Program Verification with Hoare Logic and Dafny
|
||||||
---
|
---
|
||||||
|
|
||||||
In the recitations that I'm giving for [Principles of Software](/ta/spring2022/csci2600/), we are going over reasoning through code using Hoare Logic and the program verifier Dafny. Microsoft Research designed Dafny to be similar to writing imperative code. The main difference is that you need to supply (pre/post)-conditions and the code to verify. Here's an example of how to reason about a simple statement by hand:
|
In the recitations that I'm giving for [Principles of Software](/ta/spring2022/csci2600/), we are going over reasoning through code using Hoare Logic and the program verifier Dafny. Microsoft Research designed Dafny to be similar to writing imperative code. The main difference is that you need to supply (pre/post)-conditions and the code to verify. Here's an example of how to reason about a simple statement by hand:
|
||||||
|
@ -56,8 +58,3 @@ method abs(x: int) returns (y: int)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Loop Invariants"
|
date: 2022-02-26 19:17:21-05:00
|
||||||
date: 2022-02-26T19:17:21-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Formal Methods"]
|
|
||||||
math: true
|
math: true
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 395dbef73491
|
||||||
|
tags:
|
||||||
|
- Formal Methods
|
||||||
|
title: Loop Invariants
|
||||||
---
|
---
|
||||||
|
|
||||||
Loop invariants are one of the more complicated concepts in Hoare Logic. One might say that we can simply unroll the loop, but there are many loops where we don't know the number of iterations in advanced. Therefore, we often consider what is called the loop invariant. These are statements that are true before, during, and after the loop. A useful loop invariant in combination of the negation of the loop condition can also prove some postcondition. Lets look at a multiplication example
|
Loop invariants are one of the more complicated concepts in Hoare Logic. One might say that we can simply unroll the loop, but there are many loops where we don't know the number of iterations in advanced. Therefore, we often consider what is called the loop invariant. These are statements that are true before, during, and after the loop. A useful loop invariant in combination of the negation of the loop condition can also prove some postcondition. Lets look at a multiplication example
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Rclone: The Swiss Army Knife of Cloud Storage"
|
date: 2022-04-10 22:05:46-04:00
|
||||||
date: 2022-04-10T22:05:46-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Backup"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: ee4c7c4d2966
|
||||||
|
tags:
|
||||||
|
- Backup
|
||||||
|
title: 'Rclone: The Swiss Army Knife of Cloud Storage'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Rclone](https://rclone.org/) is a terminal application that manages remote storage. It supports the standard remote filesystem protocols such as S3, (S)FTP, WebDAV as well as easy to use integration with cloud providers such as Amazon S2, Backblaze B2, Google Drive, and others. We can even perform regular backups using [Restic](https://restic.net/) with Rclone underneath. With all these features, it's easy to configure all remote storage within Rclone and then synchronize the configuration file across machines.
|
[Rclone](https://rclone.org/) is a terminal application that manages remote storage. It supports the standard remote filesystem protocols such as S3, (S)FTP, WebDAV as well as easy to use integration with cloud providers such as Amazon S2, Backblaze B2, Google Drive, and others. We can even perform regular backups using [Restic](https://restic.net/) with Rclone underneath. With all these features, it's easy to configure all remote storage within Rclone and then synchronize the configuration file across machines.
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
---
|
---
|
||||||
title: "Rebuild Kernel Modules with Akmods"
|
date: 2022-02-04 19:37:04-05:00
|
||||||
date: 2022-02-04T19:37:04-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Linux", "Fedora"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: ab0e2a2ce3b3
|
||||||
|
tags:
|
||||||
|
- Linux
|
||||||
|
- Fedora
|
||||||
|
title: Rebuild Kernel Modules with Akmods
|
||||||
---
|
---
|
||||||
|
|
||||||
Akmods is the Fedora/Red Hat way of managing kernel modules. In Ubuntu, this is `dkms`. If you're like me and force reboot shortly after performing an update, then you might have not given akmods enough time to compile any extra kernel modules (for example: Nvidia). This meant that I had to boot into an older kernel to try to fix the problem....
|
Akmods is the Fedora/Red Hat way of managing kernel modules. In Ubuntu, this is `dkms`. If you're like me and force reboot shortly after performing an update, then you might have not given akmods enough time to compile any extra kernel modules (for example: Nvidia). This meant that I had to boot into an older kernel to try to fix the problem....
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Rootless Docker-Compose with Podman"
|
date: 2022-01-29 20:21:11-05:00
|
||||||
date: 2022-01-29T20:21:11-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Containers"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: d31b7e2a688c
|
||||||
|
tags:
|
||||||
|
- Containers
|
||||||
|
title: Rootless Docker-Compose with Podman
|
||||||
---
|
---
|
||||||
|
|
||||||
One of the benefits of Podman over Docker is that it can run daemon-less and without root. However, `docker-compose` is by far my favorite way to create and maintain containers. Luckily, the Podman folks emulated the Docker CLI so that `docker-compose` works well with Podman!
|
One of the benefits of Podman over Docker is that it can run daemon-less and without root. However, `docker-compose` is by far my favorite way to create and maintain containers. Luckily, the Podman folks emulated the Docker CLI so that `docker-compose` works well with Podman!
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Mount Object Storage Locally using S3 Fuse"
|
date: 2022-02-04 23:39:25-05:00
|
||||||
date: 2022-02-04T23:39:25-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Storage"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: a6add7081378
|
||||||
|
tags:
|
||||||
|
- Storage
|
||||||
|
title: Mount Object Storage Locally using S3 Fuse
|
||||||
---
|
---
|
||||||
|
|
||||||
On most cloud providers, object storage is cheaper than paying for the equivalent size in block storage. Using FUSE, we can mount S3 compatible object storage with the command `s3fs`. Do note, that there are a few downsides with mounting object storage as documented on their [README](https://github.com/s3fs-fuse/s3fs-fuse/blob/master/README.md):
|
On most cloud providers, object storage is cheaper than paying for the equivalent size in block storage. Using FUSE, we can mount S3 compatible object storage with the command `s3fs`. Do note, that there are a few downsides with mounting object storage as documented on their [README](https://github.com/s3fs-fuse/s3fs-fuse/blob/master/README.md):
|
||||||
|
@ -62,4 +64,3 @@ bucketname /mnt/mountpoint fuse.s3fs _netdev,allow_other,url=https://us-east
|
||||||
```
|
```
|
||||||
|
|
||||||
After editing `/etc/fstab` you can run `sudo mount -a` in order for it to load and mount any new entries.
|
After editing `/etc/fstab` you can run `sudo mount -a` in order for it to load and mount any new entries.
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Aliases for Snaps and Flatpaks"
|
date: 2022-02-04 20:29:04-05:00
|
||||||
date: 2022-02-04T20:29:04-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Linux"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 5f51916cafd3
|
||||||
|
tags:
|
||||||
|
- Linux
|
||||||
|
title: Aliases for Snaps and Flatpaks
|
||||||
---
|
---
|
||||||
|
|
||||||
Sometimes snap packages and flatpaks come with unmemorable names to run their commands. Luckily for snap packages, you can easily alias them. For example, to rename the .NET executable to `dotnet` run.
|
Sometimes snap packages and flatpaks come with unmemorable names to run their commands. Luckily for snap packages, you can easily alias them. For example, to rename the .NET executable to `dotnet` run.
|
||||||
|
@ -35,4 +37,3 @@ done
|
||||||
# main
|
# main
|
||||||
launch_app "${1}"
|
launch_app "${1}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
---
|
---
|
||||||
title: "Configuring a SOCKS5 Proxy"
|
date: 2022-01-03 10:41:09-05:00
|
||||||
date: 2022-01-03T10:41:09-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Networking", "SSH"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: ed506a09a2b2
|
||||||
|
tags:
|
||||||
|
- Networking
|
||||||
|
- SSH
|
||||||
|
title: Configuring a SOCKS5 Proxy
|
||||||
---
|
---
|
||||||
|
|
||||||
A SOCKS5 proxy allows you to have network traffic as if it was coming from the proxy server as opposed to your local client. You can easily set it up using SSH from your local machine.
|
A SOCKS5 proxy allows you to have network traffic as if it was coming from the proxy server as opposed to your local client. You can easily set it up using SSH from your local machine.
|
||||||
|
@ -32,4 +35,3 @@ To do this you will need proxychains installed. On Ubuntu, the package is called
|
||||||
```
|
```
|
||||||
socks5 127.0.0.1 1337
|
socks5 127.0.0.1 1337
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Terminal Output To SVG Animations"
|
date: 2022-01-17 10:14:22-05:00
|
||||||
date: 2022-01-17T10:14:22-05:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: []
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: ad8c533610b5
|
||||||
|
tags: []
|
||||||
|
title: Terminal Output To SVG Animations
|
||||||
---
|
---
|
||||||
|
|
||||||
With [`termtosvg`](https://github.com/nbedos/termtosvg) made by Nicolas Bedo we can make SVG animations from terminal output in the style of [asciinema](https://asciinema.org/). To install use [pipx](/blog/managepythonapps/).
|
With [`termtosvg`](https://github.com/nbedos/termtosvg) made by Nicolas Bedo we can make SVG animations from terminal output in the style of [asciinema](https://asciinema.org/). To install use [pipx](/blog/managepythonapps/).
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: "Why I PESOS From Mastodon"
|
date: 2022-05-15 18:36:16-04:00
|
||||||
date: 2022-05-15T18:36:16-04:00
|
|
||||||
draft: false
|
draft: false
|
||||||
tags: ["Mastodon"]
|
|
||||||
math: false
|
math: false
|
||||||
medium_enabled: true
|
medium_enabled: true
|
||||||
|
medium_post_id: 56667e2c305
|
||||||
|
tags:
|
||||||
|
- Mastodon
|
||||||
|
title: Why I PESOS From Mastodon
|
||||||
---
|
---
|
||||||
|
|
||||||
The [IndieWeb movement](https://indieweb.org) is focused on people controlling their own experience on the web. They accomplish this by encouraging everyone to have their own personal website. Followers can then either subscribe to the [RSS feed](https://aboutfeeds.com/) and provide [Webmentions](https://indieweb.org/Webmention) back to the post, or they can interact with the material directly on another website like [Mastodon](https://joinmastodon.org/).
|
The [IndieWeb movement](https://indieweb.org) is focused on people controlling their own experience on the web. They accomplish this by encouraging everyone to have their own personal website. Followers can then either subscribe to the [RSS feed](https://aboutfeeds.com/) and provide [Webmentions](https://indieweb.org/Webmention) back to the post, or they can interact with the material directly on another website like [Mastodon](https://joinmastodon.org/).
|
||||||
|
|
Loading…
Reference in a new issue