mirror of
https://github.com/TomHodson/tomhodson.github.com.git
synced 2025-06-26 10:01:18 +02:00
Update past posts to use the new markdownified excerpts
This commit is contained in:
parent
346766f6f6
commit
f53a08e1c2
1
_drafts/adding_comments.md
Normal file
1
_drafts/adding_comments.md
Normal file
@ -0,0 +1 @@
|
||||
https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/
|
20
_drafts/test.md
Normal file
20
_drafts/test.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Test post
|
||||
excerpt: This is to test stuff out, it should never actually get published!
|
||||
layout: post
|
||||
image:
|
||||
alt:
|
||||
---
|
||||
|
||||
<!-- <div class="strava-embed-placeholder" data-embed-type="activity" data-embed-id="9552293688"></div><script src="https://strava-embeds.com/embed.js"></script> -->
|
||||
|
||||
<!-- Import the component -->
|
||||
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.1.1/model-viewer.min.js"></script>
|
||||
|
||||
<!-- Use it like any other HTML element -->
|
||||
<!-- <model-viewer alt="test" src="/assets/blog/toothbrush_shelf/toothbrush_shelf.glb" ar environment-image="" poster="/assets/blog/toothbrush_shelf/spin.gif" shadow-intensity="1" camera-controls touch-action="pan-y"></model-viewer> -->
|
||||
|
||||
<!-- <model-viewer> HTML element -->
|
||||
<model-viewer src="/assets/blog/toothbrush_shelf/model/toothbrush_shelf.glb" ar ar-modes="webxr scene-viewer quick-look" camera-controls poster="/assets/blog/toothbrush_shelf/model/poster.webp" shadow-intensity="1" auto-rotate camera-orbit="-212.4deg 77.5deg 411.2m" field-of-view="30deg"> </model-viewer>
|
||||
<!-- Loads <model-viewer> for browsers: -->
|
||||
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.0.1/model-viewer.min.js"></script>
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Command Line Slides
|
||||
excerpt: I had to give a quick lecture on using the command line and came up with this to do live demos of using the command line.
|
||||
excerpt: |
|
||||
I made a set of interactive slides for a course on the command line, complete with command line playback!
|
||||
<script async id="asciicast-498583" src="https://asciinema.org/a/498583.js" data-autoplay="true"></script>
|
||||
layout: post
|
||||
image: /assets/images/command_line_slides.png
|
||||
alt: A screenshot of a slide deck with computer code on it.
|
||||
---
|
||||
|
||||
I had to give a quick lecture on using the command line and came up with this to do live demos of using the command line. Embedded below.
|
||||
|
@ -1,9 +1,22 @@
|
||||
---
|
||||
title: Parsing is fun!
|
||||
excerpt: I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser.
|
||||
excerpt: |
|
||||
I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser.
|
||||
```python
|
||||
import pe
|
||||
|
||||
parser = pe.compile(
|
||||
r'''
|
||||
List <- "[" String ("," Spacing String)* "]"
|
||||
String <- ~[a-zA-Z]+
|
||||
Spacing <- [\t\n\f\r ]*
|
||||
''',
|
||||
)
|
||||
parser.match("[a, b, c]").groups()
|
||||
|
||||
>>> ('a', 'b', 'c')
|
||||
```
|
||||
layout: post
|
||||
image: /assets/blog/parsing/snippet.png
|
||||
alt: A purely illustrative screenshot of a snippet of python code with a little bit of a PEG grammar definition visible.
|
||||
commentid: 110746239432993930
|
||||
---
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
title: A little REPL in every blog post
|
||||
layout: post
|
||||
image:
|
||||
alt:
|
||||
image: /assets/blog/repl.png
|
||||
alt: A screenshot of a small javascript widget that lets you evaluate python code. It's showing some numpy code and its evaluated output.
|
||||
klipse: True
|
||||
---
|
||||
|
||||
|
BIN
assets/blog/repl.png
Normal file
BIN
assets/blog/repl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
Loading…
x
Reference in New Issue
Block a user