Skip to content

Commit

Permalink
Merge pull request #1 from x4d3/prettier
Browse files Browse the repository at this point in the history
Format with prettier
  • Loading branch information
x4d3 authored May 15, 2024
2 parents f3c78ad + c18fad3 commit dbf59b3
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 59 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

```
bundle exec jekyll serve
```
```

```
prettier "**/*.md" --write --print-width 120
```
7 changes: 2 additions & 5 deletions _posts/2021-03-23/2021-03-23-rosenkavalier-hab-mirs-gelobt.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
---
layout: post
title: >
Der Rosenkavalier: "Hab mir's gelobt"
Der Rosenkavalier: "Hab mir's gelobt"
slug: rosenkavalier-hab-mirs-gelobt
tags:
category: Music
---

{% include youtube.html id="fi810zB3L04" %}

[IMSLP117570-PMLP29341-Strauss_-_Der_Rosenkavalier_VS_UNC3.pdf](IMSLP117570-PMLP29341-Strauss_-_Der_Rosenkavalier_VS_UNC3.pdf)
[IMSLP117570-PMLP29341-Strauss\_-_Der_Rosenkavalier_VS_UNC3.pdf](IMSLP117570-PMLP29341-Strauss_-_Der_Rosenkavalier_VS_UNC3.pdf)

Pages 140, From bar 284

![hab-mirs-gelobt-01.png](hab-mirs-gelobt-01.png)
![hab-mirs-gelobt-02.png](hab-mirs-gelobt-02.png)
![hab-mirs-gelobt-03.jpg](hab-mirs-gelobt-03.jpg)
![hab-mirs-gelobt-04.jpg](hab-mirs-gelobt-04.jpg)



4 changes: 1 addition & 3 deletions _posts/2023-01-12/2023-01-12-hoffman-septet.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
layout: post
title: "Contes d'Hoffman: Septet"
subtitle: Helas, Mon coeur s'egare encore
categories:
- Music
category: Music
---

I do like when everyone is singing at the same time.
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-01-26-starmania-best-rhymes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ category: Music
>
> S'en aller cultiver ses tomates

[Un enfant de la pollution](https://genius.com/Starmania-un-enfant-de-la-pollution-lyrics)

> Le parfum de l’essence
Expand All @@ -23,7 +22,6 @@ category: Music
>
> Comment veux-tu qu’on s’aime?

[Monopolis](https://paroles2chansons.lemonde.fr/paroles-starmania/paroles-monopolis.html)

> Et une étoile sur la peau
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ My advice is from someone who…
My experiences over the last 20 years have shaped how I view software, and have led me to some beliefs which I’ve tried
to whittle down to a manageable list that I hope you find valuable.

On with the list
----------------
## On with the list

### 1\. I still don’t know very much

Expand Down
31 changes: 18 additions & 13 deletions _posts/2023-01-31-how-this-blog-is-powered.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,26 @@ jobs:
username: iforever
password: ${{ secrets.ftp_password }}
server-dir: xade/blog/

```
### Ruby script to create posts automatically
```ruby
#!/usr/bin/env ruby

require 'time'
require 'fileutils'
require 'erb'
require 'optparse'
TEMPLATE = <<~EOS
---
layout: post
title: <%= title %>
category: Music
category: Music Dev Random Literature Video Games Comics Management
---
EOS

def slugify(s)
s.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
s.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
end


Expand All @@ -111,15 +110,20 @@ ERBContext = Struct.new(:title, keyword_init: true) do
end
FOLDER = "_posts"

def create_post(title)
def create_post(title:, create_folder:)
date = Date.today

context = ERBContext.new(title: title)
result = ERB.new(TEMPLATE).result(context.access_binding)

filename = "#{date.strftime('%Y-%m-%d')}-#{slugify(title)}.md"
filepath = File.join(FOLDER, filename)

formatted_date = date.strftime('%Y-%m-%d')
filename = "#{formatted_date}-#{slugify(title)}.md"
filepath =
if create_folder
File.join(FOLDER, formatted_date, filename)
else
File.join(FOLDER, filename)
end
FileUtils.mkdir_p File.dirname(filepath)
if File.exist?(filepath)
warn "File #{filepath} already exists"
else
Expand All @@ -128,11 +132,12 @@ def create_post(title)
end
end

options = {}
OptionParser.new do |opt|
opt.on("-f", "--folder", "Create Folder")
end.parse!(into: options)

raise "provide the title as argument" if ARGV.empty?

create_post(ARGV.join(' '))
create_post(title: ARGV.join(' '), create_folder: options[:folder])
```



2 changes: 1 addition & 1 deletion _posts/2023-02-19/2023-02-19-go-right.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ category: Video Games

Uploaded to YouTube by RockyPlanetesimal on April 25 2012

{% include video.html src="go-right.mp4" %}
{% include video.html src="go-right.mp4" %}
2 changes: 0 additions & 2 deletions _posts/2023-02-21-mermaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ https://mermaid.js.org/
Alice-)John: See you later!
</pre>


<pre class="mermaid">
mindmap
root((mindmap))
Expand Down Expand Up @@ -60,7 +59,6 @@ erDiagram
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</pre>


<pre class="mermaid">
graph TB
sq[Square shape] --> ci((Circle shape))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ Why didn’t they just go to a goddamned obstetrician-gynecologist?
Exported from https://www.vice.com/en/article/53d4db/womens-healthcare-star-wars which was posted on 03 January 2017
by [Sarah Jeong](https://sarahjeong.net/)


<figure>
<img src="padme.webp" alt="Anakin's Force-vision of Padme's death">
<figcaption>Anakin's Force-vision of Padme's death</figcaption>
</figure>


The central, overarching conflict of the first six Star Wars movies is that a democratic republic devolves into an
authoritarian dictatorship. A key part of that political coup is Anakin Skywalker turning to the dark side and becoming
Darth Vader. The way the story is told implies that the fall of the Republic and fall of Anakin Skywalker are
Expand Down Expand Up @@ -183,7 +181,6 @@ Darth Vader Force-chokes Admiral Ozzel (left) while simultaneously promoting Cap
<figcaption>Darth Vader force-chokes admiral Ozzel (left) while simultaneously promoting captain Piett (right) to admiral</figcaption>
</figure>


And besides, if Palpatine could remotely kill or even locate someone across hyperspace distances via the Force, there
would probably be a few people ahead of Padme on the list. For example, Obi-Wan Kenobi, who is known to be accompanying
Padme.
Expand Down
2 changes: 1 addition & 1 deletion _posts/2023-05-23/2023-05-23-clueless-hero.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ https://cluelesshero.com
![I hate this game](i-hate-this-game.jpeg)
![Missing ingredient](missing-ingredient.jpeg)
![Not stuck at home](not-stuck-at-home.jpeg)
![Storage full](storage-full.jpeg)
![Storage full](storage-full.jpeg)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Comics from [Clémentine Latron](https://www.clementinelatron.com/)
![tell-me-you-re-french-without-telling-me-you-re-french-part-05.jpeg](tell-me-you-re-french-without-telling-me-you-re-french-part-05.jpeg)
![bank-hollidays.jpeg](bank-hollidays.jpeg)
![when-you-need-to-prononce-a-french-word.jpeg](when-you-need-to-prononce-a-french-word.jpeg)
![godwin-point.png](godwin-point.png)
![godwin-point.png](godwin-point.png)
40 changes: 20 additions & 20 deletions _posts/2024-01-08-git-commit-message-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ In a mixed environment of…

## A properly formed git commit subject line should always be able to complete the following sentence

If applied, this commit will *\<your subject line here\>*
If applied, this commit will _\<your subject line here\>_

## Rules for a great git commit message style

* Separate subject from body with a blank line
* Do not end the subject line with a period
* Capitalize the subject line and each paragraph
* Use the imperative mood in the subject line
* Wrap lines at 72 characters
* Use the body to explain what and why you have done something. In most cases, you can leave out details about how a
- Separate subject from body with a blank line
- Do not end the subject line with a period
- Capitalize the subject line and each paragraph
- Use the imperative mood in the subject line
- Wrap lines at 72 characters
- Use the body to explain what and why you have done something. In most cases, you can leave out details about how a
change has been made.

## Information in commit messages

* Describe why a change is being made.
* How does it address the issue?
* What effects does the patch have?
* Do not assume the reviewer understands what the original problem was.
* Do not assume the code is self-evident/self-documenting.
* Read the commit message to see if it hints at improved code structure.
* The first commit line is the most important.
* Describe any limitations of the current code.
* Do not include patch set-specific comments.
- Describe why a change is being made.
- How does it address the issue?
- What effects does the patch have?
- Do not assume the reviewer understands what the original problem was.
- Do not assume the code is self-evident/self-documenting.
- Read the commit message to see if it hints at improved code structure.
- The first commit line is the most important.
- Describe any limitations of the current code.
- Do not include patch set-specific comments.

Details for each point and good commit message examples can be found
on https://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages
Expand Down Expand Up @@ -88,7 +88,7 @@ Fixes #123, #124

### Sources

* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
* https://wiki.openstack.org/wiki/GitCommitMessages
* http://chris.beams.io/posts/git-commit/
* https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?h=v2.36.1#n181
- http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
- https://wiki.openstack.org/wiki/GitCommitMessages
- http://chris.beams.io/posts/git-commit/
- https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?h=v2.36.1#n181
1 change: 1 addition & 0 deletions _posts/2024-02-23-matrix-quine.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: post
title: Matrix Quine
category: Dev
---

An animated quine in only 187 bytes of HTML+JS:

```html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ category: Music
</details>

## Tchaikovsky, Symphony No.5, 1st movement
1st bar of Z, the full orchestra, [at 14:28](https://youtu.be/NeNeQrUXymg?si=gWhRmxWlxHUDUAQS&t=868)

1st bar of Z, the full orchestra, [at 14:28](https://youtu.be/NeNeQrUXymg?si=gWhRmxWlxHUDUAQS&t=868)

<details>
<summary><a href="https://xade.eu/music-library/tchaikovsky-symphony-5-1st-mvmt.pdf" >tchaikovsky-symphony-5-1st-mvmt.pdf</a> Page 65</summary>
Expand All @@ -45,14 +45,12 @@ bar 20 of (19), the low brass, [at 6:17](https://youtu.be/hxAsJGflQCg?si=qEMtJv7

</details>


## Dukas, L'apprenti sorcier,
## Dukas, L'apprenti sorcier

bar 14 of (49), the Cornet Solo, [at 7:50](https://youtu.be/U4yH4B9deok?si=BKVdL1IfKJuLKNcP&t=470)

![Cornet Solo](dukas-apprenti-sorcier-cornet-solo.png)


<details>
<summary><a href="https://xade.eu/music-library/dukas-apprenti-sorcier.pdf" >dukas-apprenti-sorcier.pdf</a> Page 54</summary>

Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-05-15-tech-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ category: Dev
- [Comments that are easy to grok and grep](https://conventionalcomments.org/)
- https://0.30000000000000004.com/
- [Don't use RegEx to parse Html](https://stackoverflow.com/a/1732454)
- https://zombo.com/
- https://zombo.com/

0 comments on commit dbf59b3

Please sign in to comment.