mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-21 15:56:29 -05:00
Removing URL prefix for local URLs in blog posts
This commit is contained in:
parent
b02794d677
commit
6dc8bfbb89
21 changed files with 23 additions and 23 deletions
|
@ -33,7 +33,7 @@ gqrx.AppDir/
|
|||
|
||||
The `AppRun` executable comes from the [AppImage Releases Page](https://github.com/AppImage/AppImageKit/releases). While you're there, you should also download `appimagetool` as we'll be using that soon.
|
||||
|
||||
The `.desktop` file needs to be a valid [Linux Desktop Icon](https://brandonrozek.com/blog/linuxdesktopicons/). Some things to take note about the desktop file:
|
||||
The `.desktop` file needs to be a valid [Linux Desktop Icon](/blog/linuxdesktopicons/). Some things to take note about the desktop file:
|
||||
|
||||
- The icon is assumed to be a `.png`
|
||||
- The executable is assumed to be located in `/usr/bin/`
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Hugo", "Mastodon", "Archive"]
|
||||
math: false
|
||||
---
|
||||
In the spirit of [syndicating Mastodon toots](https://brandonrozek.com/blog/why-i-pesos-from-mastodon/)
|
||||
In the spirit of [syndicating Mastodon toots](/blog/why-i-pesos-from-mastodon/)
|
||||
to my own site, I wrote a Python script that turns toots into Hugo markdown
|
||||
files.
|
||||
|
||||
|
@ -32,7 +32,7 @@ https://fosstodon.org/api/v1/accounts/108219415927856966
|
|||
|
||||
By default, this will return 20 statuses in an array.
|
||||
To see how to parse each individual status, check out my
|
||||
post on [displaying a single toot](https://brandonrozek.com/blog/displaying-a-toot-hugo/).
|
||||
post on [displaying a single toot](/blog/displaying-a-toot-hugo/).
|
||||
|
||||
You can use the limit parameter to set how many statuses you wish to see.
|
||||
The maximum number you can set it to is 40.
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
I've written a post on using [callbacks in Python](https://brandonrozek.com/blog/pysubscribepattern/). Though to add callbacks to `asyncio` functions, you'll have to interact with the loop object directly. Replace the emit function in the previous post with the following:
|
||||
I've written a post on using [callbacks in Python](/blog/pysubscribepattern/). Though to add callbacks to `asyncio` functions, you'll have to interact with the loop object directly. Replace the emit function in the previous post with the following:
|
||||
```python
|
||||
class Application:
|
||||
# ...
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Containers"]
|
||||
---
|
||||
|
||||
This post will combine that last three posts on [Packer](https://brandonrozek.com/blog/snapshotswithpacker/), [Terraform](https://brandonrozek.com/blog/autodeployterraform/), and their [configuration](https://brandonrozek.com/blog/sharedpackerterraformconfig/) to show an entire example of how to deploy a docker-compose application. We will specifically look at deploying a game called [`minetest`](https://www.minetest.net/) on DigitalOcean, but these principles can be adjusted to deploy your application as well. The entire setup is [documented on Github](https://github.com/Brandon-Rozek/minetest-deploy).
|
||||
This post will combine that last three posts on [Packer](/blog/snapshotswithpacker/), [Terraform](/blog/autodeployterraform/), and their [configuration](/blog/sharedpackerterraformconfig/) to show an entire example of how to deploy a docker-compose application. We will specifically look at deploying a game called [`minetest`](https://www.minetest.net/) on DigitalOcean, but these principles can be adjusted to deploy your application as well. The entire setup is [documented on Github](https://github.com/Brandon-Rozek/minetest-deploy).
|
||||
|
||||
## Shared Config
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Deployment"]
|
||||
---
|
||||
|
||||
I have recently written about [Packer](https://brandonrozek.com/blog/snapshotswithpacker/) to create system images or snapshots. This post will go over another [HashiCorp](https://www.hashicorp.com/) project named [Terraform](https://www.terraform.io/) that we can use to deploy that image to a VPS. Like before, I am going to go over how to setup this up in DigitalOcean. Check out [this list](https://www.terraform.io/docs/providers/index.html) for documentation on your favorite cloud provider.
|
||||
I have recently written about [Packer](/blog/snapshotswithpacker/) to create system images or snapshots. This post will go over another [HashiCorp](https://www.hashicorp.com/) project named [Terraform](https://www.terraform.io/) that we can use to deploy that image to a VPS. Like before, I am going to go over how to setup this up in DigitalOcean. Check out [this list](https://www.terraform.io/docs/providers/index.html) for documentation on your favorite cloud provider.
|
||||
|
||||
## Variables
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ tags: ["Linux"]
|
|||
|
||||
The [freedesktop specification](https://specifications.freedesktop.org/autostart-spec/0.5/ar01s02.html) describes how to identify file types, launch applications, and other useful desktop functions. A useful spec I've found recently is for launching desktop applications when you log into your machine.
|
||||
|
||||
In my Kubuntu 20.10 system, the directory `$HOME/.config/autostart` can contain [`.desktop`](https://brandonrozek.com/blog/linuxdesktopicons/) files that describes the applications to start on login. Drop whichever desktop file you wish to start there. In other systems it may be located under `$XDG_CONFIG_DIRS/autostart`.
|
||||
In my Kubuntu 20.10 system, the directory `$HOME/.config/autostart` can contain [`.desktop`](/blog/linuxdesktopicons/) files that describes the applications to start on login. Drop whichever desktop file you wish to start there. In other systems it may be located under `$XDG_CONFIG_DIRS/autostart`.
|
||||
|
||||
If you want to start up a script instead, you can put the script under `$HOME/.config/autostart-scripts`.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
A great [StackOverflow post](https://stackoverflow.com/a/35710527) by [Aaron Hall](https://stackoverflow.com/users/541136/aaron-hall) that shows how you can create an `export` decorator in order to not have to specify all the names you want to expose via [`__all__`](https://brandonrozek.com/blog/pythonall/).
|
||||
A great [StackOverflow post](https://stackoverflow.com/a/35710527) by [Aaron Hall](https://stackoverflow.com/users/541136/aaron-hall) that shows how you can create an `export` decorator in order to not have to specify all the names you want to expose via [`__all__`](/blog/pythonall/).
|
||||
|
||||
The Decorator:
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
In my last post I spoke about [concurrency with asyncio](https://brandonrozek.com/blog/pyasyncio/). Now what if you don't want to concern yourself with async/await practices and just want to write synchronous code that executes I/O asynchronously? That's where the library [gevent](http://www.gevent.org/) comes in. It does this by modifying Python's standard library during runtime to call it's own asynchronous versions.
|
||||
In my last post I spoke about [concurrency with asyncio](/blog/pyasyncio/). Now what if you don't want to concern yourself with async/await practices and just want to write synchronous code that executes I/O asynchronously? That's where the library [gevent](http://www.gevent.org/) comes in. It does this by modifying Python's standard library during runtime to call it's own asynchronous versions.
|
||||
|
||||
Last post code's example written in `gevent`.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
I enjoy both managing my Python versions with [pyenv](https://brandonrozek.com/blog/pyenv/) and the literate programming environment [Jupyter lab](https://jupyter.org/). Luckily we can easily manage Python virtual environments via iPython kernels.
|
||||
I enjoy both managing my Python versions with [pyenv](/blog/pyenv/) and the literate programming environment [Jupyter lab](https://jupyter.org/). Luckily we can easily manage Python virtual environments via iPython kernels.
|
||||
|
||||
We're going to start off with our base Python interpretor
|
||||
```bash
|
||||
|
|
|
@ -6,7 +6,7 @@ tags: ["LaTex"]
|
|||
math: false
|
||||
---
|
||||
|
||||
I often struggle with deciding how much content to put on my slides. Personally, I feel that my slides should be self-contained so that others can review them afterwards. This was especially true when I held [recitations](https://brandonrozek.com/ta/spring2022/csci2600/) as a TA.
|
||||
I often struggle with deciding how much content to put on my slides. Personally, I feel that my slides should be self-contained so that others can review them afterwards. This was especially true when I held [recitations](/ta/spring2022/csci2600/) as a TA.
|
||||
|
||||
What if instead of putting all the content into one slide, we can have a corresponding notes document? Crazy enough, Beamer comes to the rescue!
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Now there already exists a [OBS plugin](https://github.com/CatxFish/obs-v4l2sink
|
|||
|
||||
To see discussion around this topic, check out this [Github thread](https://github.com/CatxFish/obs-virtual-cam/issues/17).
|
||||
|
||||
OBS has two different options, streaming and recording. Since I want the ability to record a high fidelity version of my feed, we will use streaming to push video to a local RTMP server. This local RTMP server will then re-encode the video to a [v4l2 video device](https://brandonrozek.com/blog/fakewebcam/).
|
||||
OBS has two different options, streaming and recording. Since I want the ability to record a high fidelity version of my feed, we will use streaming to push video to a local RTMP server. This local RTMP server will then re-encode the video to a [v4l2 video device](/blog/fakewebcam/).
|
||||
|
||||
We will use `ffmpeg` as our RTMP server
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ Regardless, to my surprise, setting up a repository of python wheels doesn't tak
|
|||
|
||||
## Setup
|
||||
|
||||
First I would recommend that you setup a virtual environment. Either through [pyenv](https://brandonrozek.com/blog/pyenv/) or [python-virtualenv](https://brandonrozek.com/blog/virtualenv/).
|
||||
First I would recommend that you setup a virtual environment. Either through [pyenv](/blog/pyenv/) or [python-virtualenv](/blog/virtualenv/).
|
||||
|
||||
Then, install whatever packages you would like. Let us use tensorflow as an example:
|
||||
|
||||
|
@ -79,5 +79,5 @@ Or they can just install the packages they want
|
|||
pip install --no-index -f /path/to/wheels/wheels package_name
|
||||
```
|
||||
|
||||
If you don't want to add flags to every command, check out my post on using [configuration files with pip](https://brandonrozek.com/blog/pipconf/).
|
||||
If you don't want to add flags to every command, check out my post on using [configuration files with pip](/blog/pipconf/).
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ tags: ["Formal Methods"]
|
|||
math: false
|
||||
---
|
||||
|
||||
In the recitations that I'm giving for [Principles of Software](https://brandonrozek.com/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:
|
||||
|
||||
```csharp
|
||||
// Precondition: x > 0
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: [ "Python" ]
|
||||
---
|
||||
|
||||
I wrote previously about [managing python virtual environments](https://brandonrozek.com/blog/virtualenv/). Since then, I've discovered a software called [Pyenv](https://github.com/pyenv/pyenv) which allows you to not only manage virtual environments but python versions. As someone who likes to develop python programs in his free time, I found this incredibly useful in keeping all my virtual environments in one place and easily upgrading to a more recent version of python.
|
||||
I wrote previously about [managing python virtual environments](/blog/virtualenv/). Since then, I've discovered a software called [Pyenv](https://github.com/pyenv/pyenv) which allows you to not only manage virtual environments but python versions. As someone who likes to develop python programs in his free time, I found this incredibly useful in keeping all my virtual environments in one place and easily upgrading to a more recent version of python.
|
||||
|
||||
To install, follow the steps outlined in the [pyenv-istaller](https://github.com/pyenv/pyenv-installer) repository. As of now, it's a bash script.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ I ran into an issue with PyMC3 where it was expecting a certain symbol that Pyth
|
|||
Exception: Compilation failed (return status=1): /usr/bin/ld: /home/rozek/.pyenv/versions/3.8.2/lib/libpython3.8.a(floatobject.o): relocation R_X86_64_PC32 against symbol `PyFloat_Type' can not be used when making a shared object; recompile with -fPIC. /usr/bin/ld: final link failed: bad value. collect2: error: ld returned 1 exit status.
|
||||
```
|
||||
|
||||
Since I use [`pyenv`](https://brandonrozek.com/blog/pyenv/) for Python version management, it turned out that I only needed to modify the `CFLAGS` variable to get this working
|
||||
Since I use [`pyenv`](/blog/pyenv/) for Python version management, it turned out that I only needed to modify the `CFLAGS` variable to get this working
|
||||
|
||||
```bash
|
||||
CFLAGS="-fPIC" pyenv install 3.8.2
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
It is common for larger applications to have modules that publishes and subscribes to events. This post will outline a couple ways to achieve this using [decorators](https://brandonrozek.com/blog/pydecorators/) and standard methods.
|
||||
It is common for larger applications to have modules that publishes and subscribes to events. This post will outline a couple ways to achieve this using [decorators](/blog/pydecorators/) and standard methods.
|
||||
|
||||
## Single Event
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Python"]
|
||||
---
|
||||
|
||||
I wrote a [blog post about operator overloads](https://brandonrozek.com/blog/cppoverloads/) in C++. Luckily for Python it is heavily document in what is called the [Python Data Model](https://docs.python.org/3/reference/datamodel.html). Though for the sake of having content, I'll share some of the ones that I heavily use in my classes.
|
||||
I wrote a [blog post about operator overloads](/blog/cppoverloads/) in C++. Luckily for Python it is heavily document in what is called the [Python Data Model](https://docs.python.org/3/reference/datamodel.html). Though for the sake of having content, I'll share some of the ones that I heavily use in my classes.
|
||||
|
||||
| Operator | Method |
|
||||
| -------- | ---------------------- |
|
||||
|
|
|
@ -4,7 +4,7 @@ date: 2020-02-21T22:42:55-05:00
|
|||
draft: false
|
||||
tags: [ "Python" ]
|
||||
---
|
||||
**Deprecated in favor of [pip install editable](https://brandonrozek.com/blog/pipeditable)**
|
||||
**Deprecated in favor of [pip install editable](/blog/pipeditable)**
|
||||
|
||||
I've found it to be incredibly helpful to emulate having a library installed on my system rather than depending on my local directory path to pick up my file edits. To do this in a python project where you've defined a `setup.py`, you can specify the command `develop`.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Deployment"]
|
||||
---
|
||||
|
||||
You might have noticed from my last two posts on [Packer](https://brandonrozek.com/blog/snapshotswithpacker/) and [Terraform](https://brandonrozek.com/blog/autodeployterraform/) that the configuration files are highly similar. In fact, we can trick them into sharing a configuration file!
|
||||
You might have noticed from my last two posts on [Packer](/blog/snapshotswithpacker/) and [Terraform](/blog/autodeployterraform/) that the configuration files are highly similar. In fact, we can trick them into sharing a configuration file!
|
||||
|
||||
## Shared Configuration
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ draft: false
|
|||
tags: ["Networking"]
|
||||
---
|
||||
|
||||
I've written about relaying TCP traffic using [SSH port forwarding](https://brandonrozek.com/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.
|
||||
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.
|
||||
|
||||
The following will listen to TCP traffic on port 8001 and redirect it to TCP localhost:8000
|
||||
|
||||
|
|
|
@ -21,4 +21,4 @@ There are also browser extensions that you can use such as [LiveHosts](https://g
|
|||
|
||||
If this is going to be a publicly facing service, then you should just set the records of your domain name to point to the server.
|
||||
|
||||
If it's a non-public routable service, then perhaps try looking into setting up your own private [dns server](https://brandonrozek.com/blog/coredns/).
|
||||
If it's a non-public routable service, then perhaps try looking into setting up your own private [dns server](/blog/coredns/).
|
||||
|
|
Loading…
Reference in a new issue