Skip to content

Commit

Permalink
Use statically cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
pypeaday committed Dec 14, 2024
1 parent beae0d9 commit 3115cc8
Show file tree
Hide file tree
Showing 39 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
serve:
marmite pype.dev site --watch --serve --bind "0.0.0.0:8001"
marmite pype.dev markout --watch --serve --bind "0.0.0.0:8001"
3 changes: 2 additions & 1 deletion pype.dev/content/blog/benchmark-your-disks-with-fio.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Here is a random screenshot of my glances homepage at time of writing - The
only major load on my server is some `ffmpeg` transcoding (about 60% CPU
utilization)...

![Alt Text](/media/glances-iowait.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/glances-iowait.png" alt="glances" title="glances with iowait" />


As you can see... there's a lot of issues and _I don't even know what they mean_.

Expand Down
7 changes: 6 additions & 1 deletion pype.dev/content/blog/initial-proxmox-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ tags:

---

Look at notes in home-server... apt repos, zfs, etc.
1. `apt-get` by default wil go to the pve.enterprise repos so we need to point it to the non-enterprise ones.
```
rm /etc/apt/sources.list.d/pve-enterprise.list
vim /etc/apt/sources.list.d/pve-no-subscription.list
# add deb http://download.proxmox.com/debian/pve buster pve-no-subscription
```
7 changes: 4 additions & 3 deletions pype.dev/content/blog/ipython-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ I won't write about that here but you can find my `rich` config [here](https://g

My zsh prompt looks a little something like this:

![Alt Text](/media/zsh-starship-prompt.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/zsh-starship-prompt.png" alt="starship" title="A starship prompt" />


And after my ipython customiztion it currently (subject to much change but this is as of my dotfiles commit #d22088f6be81a58b5f7dfb73b7a4088cbdd9fece on `main`).

![Alt Text](/media/ipython-prompt.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/ipython-prompt.png" alt="ipython" title="A starship inspired ipython prompt" />

Now in ipython I have an indicator of my working directory, git branch, python environment, and a note that I'm in `ipython` and not `zsh`.
I also configured my prompt to warn me if I'm _not_ in a git directory!

![Alt Text](/media/ipython-prompt-no-git.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/ipython-prompt-no-git.png" alt="ipython-ng" title="A starship inspired ipython prompt without git" />

All in all the customization isn't too bad with just 2 specific files.

Expand Down
11 changes: 11 additions & 0 deletions pype.dev/content/blog/modal-labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,14 @@ An environment variable, `BASE_VERSION` that I expect to be in my base image
was not available to the python function in my Modal app... hopefully the log
is still
[here](https://modal.com/logs/ap-qYjE45dciqgT3C3CpNp3RL?functionId=fu-rOt31ShRE1W1CQfuf02fsq&taskId=ta-dm8BfiblvFLwVIQyt75YC2&inputId=in-n64klEFrLtbcm2BiykJEvW)


## GitHub Actions

I think it'd be easy to deploy from GH actions... just need an API Key...

# Deployment

Without gitops it's already ahrd to manage my versions... need to get that built in either to github or locally sooooon

Nomad?? :D
3 changes: 2 additions & 1 deletion pype.dev/content/blog/plotly-and-streamlit.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@ if __name__ == "__main__":

You can save this as `my_dash.py` and run with `streamlit run my_dash.py` and should see something like the following!

![Alt Text](/media/plotly-streamlit.gif "plotly-streamlit-gif")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/plotly-streamlit.gif" alt="plotly" title="Plotly in Streamlit" />

10 changes: 6 additions & 4 deletions pype.dev/content/blog/starship.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ The default sh/bash/zsh prompts are... to put it lightly... garbage... I can't s

Here's the default `sh` prompt...

![Alt Text](/media/sh-prompt.png)

<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/sh-prompt.png" alt="sh" title="A default sh prompt" />


Then switching to `zsh` you get something marginally better (plus tab completion!)

![Alt Text](/media/zsh-prompt.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/zsh-prompt.png" alt="zsh" title="A default zsh prompt" />

But this still is super gross... there's nothing to indicate file types and no status information readily available (ie. `git status` etc.)

Expand All @@ -37,7 +39,7 @@ Kitty themes though - do not give me a nice prompt.

The default prompt you get with `oh-my-zsh` themes isn't bad though (and you can pick from several default themes)...

![Alt Text](/media/zsh-oh-my-zsh-prompt.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/zsh-oh-my-zsh-prompt.png" alt="omz" title="A default oh-my-zsh prompt" />

Notice that you get some nice coloring and some default `git` status stuff, mainly the branch you are on.
There's plugins to show you more and that's all well and good, but again it's not my choice...
Expand All @@ -59,7 +61,7 @@ My starship config is found [here](https://github.com/nicpayne713/dotfiles/blob/
Now I have a beautiful prompt with relevant information that's a dream to look at!

![Alt Text](/media/zsh-starship-prompt.png)
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/zsh-starship-prompt.png" alt="starship" title="A starship prompt" />

I have configured my starship to show me relevant `git status` options (stashes, untracked files, etc etc.)
I also have starship show me if I'm in a git repo, what branch I'm on, if I'm in a python project and if so what virtual environment is active.
Expand Down
4 changes: 2 additions & 2 deletions pype.dev/content/blog/tiddly-wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Setting static IP on Ubuntu 20.04
addresses: [8.8.4.4, 8.8.8.8]
```
```
![Alt text](/media/tiddlywiki-example.png "A Tiddler")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/tiddlywiki-example.png" alt="tiddlywiki" title="A TiddlyWiki Example" />
```
The `#` create a numbered list, `//` creates an italicized heading, and `!` creates headings similar to Markdown's `#`. The differences aren't too bad to keep in mind and what renders out is totally depenent on the tidlywiki itself.
My template has a nice nord feel to it, feel free to download from my github and try it out!

Expand Down
2 changes: 1 addition & 1 deletion pype.dev/content/blog/truenas-and-wireguard.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ This really threw me for a loop today but is just another reminder that if you h

Give her the 'ol reboot and now if I check `wg` I should see some traffic on my wireguard tunnel!

![Alt text](/media/truenas-wireguard.png "truenas-wireguard")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/truenas-wireguard.png" alt="TrueNAS Wireguard" title="TrueNAS and Wireguard" />
Binary file removed pype.dev/content/media/builtin-calendar.png
Binary file not shown.
Binary file removed pype.dev/content/media/df-memory-usage.png
Binary file not shown.
Binary file removed pype.dev/content/media/glances-iowait.png
Binary file not shown.
Binary file removed pype.dev/content/media/htop-d.png
Binary file not shown.
Binary file added pype.dev/content/media/icon2-round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pype.dev/content/media/icon2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pype.dev/content/media/ipython-prompt-no-git.png
Binary file not shown.
Binary file removed pype.dev/content/media/ipython-prompt.png
Binary file not shown.
Binary file removed pype.dev/content/media/plotly-streamlit.gif
Binary file not shown.
Binary file removed pype.dev/content/media/py-print-align.png
Binary file not shown.
Binary file removed pype.dev/content/media/python-crop.png
Binary file not shown.
Binary file removed pype.dev/content/media/python.png
Binary file not shown.
Binary file removed pype.dev/content/media/sh-prompt.png
Binary file not shown.
Binary file removed pype.dev/content/media/skimpy-ipython.png
Binary file not shown.
Binary file removed pype.dev/content/media/skimpy-ipython2.png
Binary file not shown.
Binary file removed pype.dev/content/media/skimpy-zsh.png
Binary file not shown.
Binary file removed pype.dev/content/media/tiddlywiki-example.png
Binary file not shown.
Binary file removed pype.dev/content/media/truenas-wireguard.png
Binary file not shown.
Binary file removed pype.dev/content/media/typed-dict-warning.png
Binary file not shown.
Binary file removed pype.dev/content/media/typed-dict.png
Binary file not shown.
Binary file removed pype.dev/content/media/zsh-oh-my-zsh-prompt.png
Binary file not shown.
Binary file removed pype.dev/content/media/zsh-prompt.png
Binary file not shown.
Binary file removed pype.dev/content/media/zsh-starship-prompt.png
Binary file not shown.
2 changes: 1 addition & 1 deletion pype.dev/content/til/abstract-base-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TypeError: Can't instantiate abstract class MyFamily with abstract methods get_d

```

![Alt text](/media/py-abc-meta.png "abcmeta")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/py-abc-meta.png" alt="abcmetadata" title="ABC Metadata" />

In order for me to extend `Family` I have to implement the method `get_dad`

Expand Down
2 changes: 1 addition & 1 deletion pype.dev/content/til/d-and-uninterruptable-sleep.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tags:
I recently have been having significant home server issues, and that's not the point of this - today I learned what `D` state is when looking at htop.


![Alt Text](/media/d-htop.png "htop-d")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/d-htop.png" alt="htop-d" title="htop with D state" />

Apparently this means "uninterruptable sleep" and it's a dev's nightmare...

Expand Down
3 changes: 2 additions & 1 deletion pype.dev/content/til/dataframe-memory-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ df = pd.read_csv("cars.csv")
df.info(memory_usage="deep")
```

![Alt text](/media/df-memory-usage.png "DF memory")

<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/df-memory-usage.png" alt="DataFrame Memory Usage" title="DataFrame Memory Usage" />
3 changes: 1 addition & 2 deletions pype.dev/content/til/python-builtin-calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ I recently learned of an awesome builtin called `calendar` that has way more th
I only needed it because I was too lazy to hard code the 7 weekdays into my module but it turns out there's a lot of useful things like `calendar.isleap()`!


![Alt text](/media/builtin-calendar.png "calendar")

<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/builtin-calendar.png" alt="builtin" title="Python's builtin calendar" />
## Future use

I'm not exactly sure what will come my way where `calendar` will be super relevant but like anything, I'm just glad to know it exists for when the time arises!
4 changes: 1 addition & 3 deletions pype.dev/content/til/python-f-string-align.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@ for varable, score in zip(variables, scores):
```




![Alt text](/media/py-print-align.png "python print")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/py-print-align.png" alt="pyprintalign" title="Align f-string printing" />
6 changes: 3 additions & 3 deletions pype.dev/content/til/skimpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ __yes!__

First thing to do is `pip install skimpy` and then it's as easy to get some summary stats with `skimpy <data>`

![Alt Text](/media/skimpy-zsh.png "skimpy-zsh")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/skimpy-zsh.png" alt="Skimpy ZSH" title="A fancy data summary in the shell" />

This is super nice for seeing missing values in particular as well as the distribution shape of the data.

Expand All @@ -35,10 +35,10 @@ So... can I see this table quickly without breaking my iPython workflow?
__Of course you can with magic!__


![Alt Text](/media/skimpy-ipython.png "skimpy-ipython")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/skimpy-ipython.png" alt="Skimpy iPython" title="A fancy data summary in iPython" />


The above assumes you're looking at a file, like you would in the terminal.
`skimpy` works even better in iPython with `from skimpy import skim` then pass any DataFrame to `skim`!

![Alt Text](/media/skimpy-ipython2.png "skimpy-ipython2")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/skimpy-ipython2.png" alt="Skimpy iPython2" title="A fancy data summary in iPython" />
4 changes: 2 additions & 2 deletions pype.dev/content/til/typeddict.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ my_dict["key_2"].pop()
With the above script you'll get an annoying warning about using `pop` on `key_2`.


![Alt text](/media/typed-dict-warning.png "dict-warning")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/typed-dict-warning.png" alt="typeddict" title="Warning in TypedDict" />


## The Solution
Expand All @@ -59,7 +59,7 @@ my_typed_dict: MyDict = {
my_typed_dict["key_2"].pop()
```

![Alt text](/media/typed-dict.png "typeddict")
<img src="https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/typed-dict.png" alt="typeddict" title="A TypedDict" />

> I was able to import TypedDict from typing, mypy_extensions, and typing_extensions
Expand Down

0 comments on commit 3115cc8

Please sign in to comment.