Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7ec4c76
Adds Red Moon
bartek Dec 1, 2020
baaa2c5
New year, new things
Feb 6, 2021
0b27e57
Add a blog post on Go, and some pygments things
Feb 15, 2021
d98fe35
Make code scrollable on mobile
Feb 15, 2021
a73dff1
Don't plaster your name on each page, silly
Feb 15, 2021
0babe6b
A clearer ending
Feb 15, 2021
14bda5c
Add some recent reads
bartek Mar 16, 2021
22f1b07
Bump pyyaml from 5.2 to 5.4
dependabot[bot] Mar 25, 2021
efa843a
Merge pull request #1 from bartek/dependabot/pip/pyyaml-5.4
bartek Apr 4, 2021
ef39cbb
Add recently read books
Jul 9, 2021
9944482
Force workflow
Jul 9, 2021
c35d7a5
Update workflows Python version
Sep 9, 2021
0edf372
Clean up CSS, improve page template
Sep 9, 2021
c3b0797
Elaborate requirements
Sep 9, 2021
2f78035
Specify Werkzeug version
Sep 9, 2021
4a2c627
Drop unnecessary background-color
Nov 4, 2021
a86b865
Drop Active Projects
Nov 5, 2021
9c835e9
Add a couple recently read books
Nov 5, 2021
f5e41ac
Remove unfinished blog link, oops
Nov 5, 2021
c01013f
Update shelf
bartek Jan 3, 2022
4113147
Update to current job
bartek Feb 25, 2022
9b04b4f
Update requirements
bartek Apr 14, 2022
975bb34
Add This is your mind on plants
bartek Apr 15, 2022
f845736
Developing Wisdom 🤷
bartek Apr 15, 2022
7f61baa
Adding a couple of highlights
bartek Jun 10, 2022
dbc48b0
Add weeknotes, week 1
bartek Jul 8, 2022
d475d9e
weeknotes, week 2
bartek Jul 15, 2022
9229827
Add wk2 link; forgot
bartek Jul 15, 2022
c28e786
weeknotes 3: a short, parenting heavy week.
bartek Jul 22, 2022
61c22bc
wk3 link
bartek Jul 30, 2022
d7fa58c
weeknotes4
bartek Aug 7, 2022
0adf195
weeknotes-wk5
bartek Aug 12, 2022
258bf99
Fix wk5 link
bartek Aug 12, 2022
dc8a3c8
weeknotes-wk6
bartek Aug 19, 2022
5fdfade
WK7
bartek Aug 27, 2022
9cd425a
Add some recent books
bartek Oct 29, 2022
f0dfd73
Upload blog to DO droplet
bartek Nov 11, 2022
7f52b09
bash shell
bartek Nov 11, 2022
b34ccdf
Refining my git workflow with --fixup
bartek Nov 25, 2022
8213f90
Clean up the home page
bartek Nov 25, 2022
d8da930
Add Mastodon
bartek Dec 19, 2022
b12a7e0
Update actions/setup-python version
bartek Dec 19, 2022
9144470
Use a version of Ubuntu which has Python 3.8.x
bartek Dec 19, 2022
cbe88b0
1300
bartek Dec 26, 2022
fcae4f8
Update total
bartek Jan 1, 2023
1aedeaf
Bump flask from 2.1.1 to 2.3.2
dependabot[bot] May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: "0 * * * *"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,16 +18,25 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.6"
python-version: "3.8.6"
- name: Build
run: |
pip install -r ./requirements.txt
python site.py build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
- name: Upload to droplet
shell: bash
run: |
mkdir -p ~/.ssh
touch ~/.ssh/id_rsa ~/.ssh/known_hosts
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa ~/.ssh/known_hosts
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
scp \
-o StrictHostKeyChecking=yes \
-P ${{ secrets.SSH_PORT }} \
-o CheckHostIP=no \
-r build/* \
bartekc@${{ secrets.SSH_HOST }}:/home/bartekc/justbartek.ca
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# justbartek.ca

Hello!
My little place on the internet

5 changes: 3 additions & 2 deletions blog/flatpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import markdown
import yaml

from .pygments import CodeBlockExtension

BASE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")

config = {
Expand All @@ -21,7 +23,6 @@

logger = logging.getLogger(__name__)


def jinja_parse(content: str, context: dict) -> str:
"""
Accept what should be a jinja template, parse with context
Expand All @@ -43,7 +44,7 @@ def jinja_parse(content: str, context: dict) -> str:


filetypes = {
"md": lambda c, _: markdown.markdown(c),
"md": lambda c, _: markdown.markdown(c, extensions=[CodeBlockExtension()]),
"jinja2": jinja_parse,
}

Expand Down
37 changes: 37 additions & 0 deletions blog/pygments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Set to True if you want inline CSS styles instead of classes
INLINESTYLES = False

import re

from markdown.preprocessors import Preprocessor
from markdown.extensions import Extension

from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.lexers import get_lexer_by_name, TextLexer


class CodeBlockPreprocessor(Preprocessor):

pattern = re.compile(r'\[sourcecode:(.+?)\](.+?)\[/sourcecode\]', re.S)

formatter = HtmlFormatter(noclasses=INLINESTYLES)

def run(self, lines):
def repl(m):
try:
lexer = get_lexer_by_name(m.group(1))
except ValueError:
lexer = TextLexer()
code = highlight(m.group(2), lexer, self.formatter)
code = code.replace('\n\n', '\n&nbsp;\n').replace('\n', '<br />')
return '\n\n<div class="code">%s</div>\n\n' % code
joined_lines = "\n".join(lines)
joined_lines = self.pattern.sub(repl, joined_lines)
return joined_lines.split("\n")

class CodeBlockExtension(Extension):
def extendMarkdown(self, md, md_globals):
md.preprocessors.add('CodeBlockPreprocessor', CodeBlockPreprocessor(), '_begin')


80 changes: 80 additions & 0 deletions pages/1300.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
title: 1,300 kilometres
date: 12-26-2022
---

1,300 and then some (*edit: official tally at exactly 1337km*): the amount of kilometres I ran this year. It is the second
calendar year in a row in which I've tracked 1,000 or more kilometres, and I
wanted to take this moment to reflect on what running has done for me.

I didn't become a runner until recently, whatever becoming a "runner" means. I
spend good money on my shoes, but otherwise run in clothing that's become
too stretched, too stained, and not appropriate for presentation in society. Most
runners I've encountered don't dress up much either, but they do love their
shoes and watches.

I began running in earnest at the onset of the COVID-19 pandemic. No doubt the
pandemic had been a wake up call to my unhealthy state, which was invisible to
friends and myself. Most of my problems secured away, hidden behind a fake
smile, sans the obvious 40lbs of unwanted weight.

Prior to this most recent attempt, I proclaimed running was *boring*! I'd
prefer to participate in a team sport (Ultimate Frisbee was my choice for many
years). Gradually, with the growing of our young family, starting anew in the
maritime city of Halifax, Canada, and being challenged by the ins and outs of
each week (What crisis you have for us next, world?), finding the time and
energy to participate in scheduled group activities was ... waning.

Slowly, I learned boring is good. A consistent routine where the only
expectations were set by myself. This worked exceptionally well during the
COVID-19 pandemic where my busy & complicated head could have a time of day to
escape from ✨ everything ✨. These days, the run is a form of daily spring
cleaning, helping to (re)build the integrity of my body and mind. The crippling
anxiety slowly reduced, so did the dread. The world continued to throw hard
balls (at *all of us*), and it was running which helped me not run out of gas.
It offered me daily strength and re-ignited me in surprising ways. It was what
I needed for my family but more importantly for myself. For the first time in a
long time, I believed in myself again.

The run helped solve the daily problem. This may have been as trivial as what's
going on the dinner table tonight to inter-personal challenges and technical
problems at work, and so on. I spend the run processing, talking to myself, and
[listening to others](https://lexfridman.com/podcast/). I step through a
conversation. Get into my head, and eventually, I come home. Not
tired, but rested. Today's run is done.

It's not all serious, too! My runs began to include a form of public
journaling where I engaged with fellow colleagues from the urbanism community
of Halifax, through updates on city infrastructure, to [mapping bike parking
across the city](https://github.com/bartek/hfxbikeparking), silly and simple
things which at times provided me a destination. Through these runs I
encountered many other runners, sharing peace signs, high fives, and smiles — a
guaranteed high five coming during the worst of weather, where hardly a
runner is to be spotted. I can't feel my face but heck yeah, we're out here loving every minute.


In late 2021, I encountered a post on [reddit](https://reddit.com) about a
trail running group called the Halifax Hares. This group runs in wooded trails
around Halifax and enjoys a 7-9 kilometer run each week, ending the run with
some cookies and socials (sometimes at a local pub)

Running began as an anti-social activity yet it was clear engagement with
others was important to me. Running with others has been an adjustment, in
particular because I am terrible at small talk (thankfully, it's not hard to
get into interesting conversations over a few kilometres!), and it has been the
Hares which made this easier. A diverse group of friendly, motivated, and
inspiring people who are always up to wild things.

Many are ultra runners. Yup, slow (usually trail) running that goes on for 50,
70, 100km. These runs happen over the course of a day, through the night, and
challenge every part of the body and mind. I was most inspired by a runner who
did his first 100km: He ran through day and night within Cape Breton, NS. He
got deep in his head, was bit by something nasty, and he eventually saw the sun
rise. Exhausted, fucked up, and happy all at once.

There is a connection here I aim to seek. A connection between the body and
mind, where the running passes the threshold of physical pain. It is here
where I anticipate the world can disappear and one in which I will be
challenged to truly speak to myself.

That is my destination. To get there, I need to run. So, here's to 2023. 🏃
7 changes: 7 additions & 0 deletions pages/aws-good-parts.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ time. It is incomplete, but figured I'd push what I have so far.
* More or less twice as expensive for on-demand but prices drop quite quickly
when looking at reserved instances.

## Redshift

* Fully managed petabyte-scale (big!) data warehouse service
* Redshift Spectrum is a feature available in Redshift which allows querying of S3 data
directly.
*


## Appendix

Expand Down
18 changes: 5 additions & 13 deletions pages/books.jinja2
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
title: Books I've read (partially and fully)
date: 09-03-2020
title: Books I've enjoyed
date: 10-29-2022
data: data/books.json
---

<p>I've set a goal of reading 12 books in 2020. On this page, I list the books I
have read, am reading, or failed to read (started, couldn't finish)</p>

<p>I have a bad habit of reading plenty of 5-10 minute pieces, love anything
technical, and consume plenty of podcasts. However,
I struggle to sit down with a book. Taking my time back is an important goal of
2020 for me, hence the need to sit down and read.</p>

<h2>2020 Book shelf</h2>
<h2>Book Shelf</h2>

<div class='book-shelf'>
{% for book in books %}
{% for book in books|sort(attribute="Date", reverse=True) %}
<div class='book'>
<a href='{{ book.GoodreadsURL }}'><img src='{{ book.CoverURL }}'></a>
<p>{{ book.Title }}</p>
<p class='subtitle'>{{ book.Status }}</p>
<p class='subtitle'>{{ book.Status }} (Added {{ book.Date }})</p>
</div>
{% endfor %}
</div>
Loading
Loading