Laplacian

a minimalist Jekyll theme

What is a Bite?

A bite is a short article. Some might say, it’s bite-sized. As an example, this is how you would define a class in Python 2 and Python 3 respectively.

# Python 2
class MyClass(object):
    def __init__(self, data):
        self.data = data
# Python 3
class MyClass:
    def __init__(self, data):
        self.data = data

What can you convey in a bite?

Bites are intended to lie somewhere between a tweet and a regular post or article. Let’s say, you find a cool shell trick that you want to share with a short explanation. Below is one such example. Often, we need to recursively seek and destroy all .pyc files within current directly. The following command does that for us in bash shell.

find . -name "*.pyc" -type f -exec rm "{}" \;

Simply typing find . -name "*.pyc" -type f would list all files (and not directories) whose name matches the glob *.pyc within the directory . (current directory). find also accepts -exec option in both Linux and MacOS (though -delete option may not always be available). See other variants here.

Bites support comments

Bites are Jekyll collections. For most part, they behave just like posts but there are a few downsides. Pagination doesn’t work out of the box for collections (see this GitHub issue).

Implementing Bites as regular posts also lacks pagination because Jekyll pagination does not support categories.

But, Bites still support comments. Simply go to the Bite’s permalink.