til

29
Jan

Programmatically Creating Styled Cells In Jupyter Notebooks

I've been playing around with the idea of using Jupyter notebooks as a narrative game interface for a while, and finally got around to doing some prototyping this week. One thing I really wanted to do was require users to run code cells in Jupyter to unlock story beats: Jupyter notebooks are usually presented as a step-by-step tutorial, which is perfectly fine if you're trying to teach someone how to run a linear regression in sklearn but less so if you're trying to build suspense over the course of a story.

It's pretty easy to get output from just running

Read more
3 min read
18
Jan

Checking Disk Space On An Ubuntu Server

du -cha --max-depth=1 / | grep -E "M|G"

From this StackOverflow answer - ncdu is also a good tool for this, allegedly, but its output didn't really seem to have any correlation to the actual folders on my server. I feel like I have to do this once a year because of storage issues and always forget, so hopefully this serves as a reminder going forward. Turns out snap is the culprit, as per usual. In a fit of pique I uninstalled snap and all of its files, and lo and behold I'm able to finally update Ghost!