From 7db700a96cb36f233201ed88244f1a7dbfe7ebd9 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 8 Feb 2024 06:53:16 +0100 Subject: Tweaks --- _includes/webring.html | 4 ++-- _layouts/base.html | 5 ++++- _posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | 6 +++++- _posts/2022-06-30-trying-out-helix-editor.md | 3 ++- index.html | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/_includes/webring.html b/_includes/webring.html index f68299d..071d7ef 100644 --- a/_includes/webring.html +++ b/_includes/webring.html @@ -32,8 +32,8 @@
When a service fails to start up enough times in a row, systemd gives up on it. On servers, this isn’t what I want — in general it’s helpful for automated recovery if daemons are restarted indefinitely. As long as you don’t have circular dependencies between services, all your services will eventually come up after tra...
  • -
    We might want to regularly keep track of how important each server is — Chris's Wiki :: blog
    -
    Today we had a significant machine room air conditioning failure in our main machine room, one that certainly couldn't be fixed on the spot ('glycol all over the roof' is not a phrase you really want to hear about your AC's chiller). To keep the machine room's temperature down, we had to power off as many machines as p...
    +
    What I'd like in a hypothetical new desktop machine in 2024 — Chris's Wiki :: blog
    +
    My current work desktop and home desktop are getting somewhat long in the tooth, which has caused me to periodically think about what I'd want in new hardware for them. Sometimes I even look at potential hardware choices for such a replacement desktop (which can lead to grumbling). Today I want to write down my ideal b...
  • Q4 2023 — Improving Replit's Console and a Database-y Creative Coding Environment — Szymon Kaliski
    diff --git a/_layouts/base.html b/_layouts/base.html index e39acf4..aa4be41 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -110,6 +110,7 @@ overflow-x: auto; padding: 1em; border: var(--border-size) var(--border-style) var(--border-color); + border-radius: 3px; } code { @@ -121,6 +122,7 @@ pre code { background: transparent; + padding: initial; } figure { @@ -142,6 +144,7 @@ img, video, audio { width: 800px; max-width: 100%; + border-radius: 3px; } header nav { @@ -154,7 +157,7 @@ } audio::-webkit-media-controls-enclosure { - border-radius: 0; + border-radius: 3px; } .highlight .hll { background-color: #ffffcc } diff --git a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md index 1de83af..6980ed1 100644 --- a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md +++ b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md @@ -111,6 +111,7 @@ Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine bases. The sugar and the base together are called a nucleoside. ![DNA](/assets/posts/dna-sequence/dna-basics.jpg){:loading="lazy"} + *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts)* @@ -301,6 +302,7 @@ Then we encode FASTA file from previous operation to encode this data into PNG. After encoding into PNG format this file looks like this. ![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png){:loading="lazy"} + The larger the input stream is the larger the PNG file would be. Compiled basic Hello World C program with @@ -368,8 +370,8 @@ First we generate some binary sample data with dd. dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock ``` - ![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png){:loading="lazy"} + Our freshly generated 1KB file looks something like this (its full of garbage data as intended). @@ -396,9 +398,11 @@ gzip -9 < 10MB.fa > 10MB.fa.gz ``` ![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg){:loading="lazy"} + The speed increase that occurs when encoding to FASTA format. ![File sizes](/assets/posts/dna-sequence/chart-size.svg){:loading="lazy"} + Size of the out file after encoding. [Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). diff --git a/_posts/2022-06-30-trying-out-helix-editor.md b/_posts/2022-06-30-trying-out-helix-editor.md index 61f653a..be369a1 100644 --- a/_posts/2022-06-30-trying-out-helix-editor.md +++ b/_posts/2022-06-30-trying-out-helix-editor.md @@ -36,7 +36,8 @@ One thing to do before you are able to use autocompletion and make use Language Server support is to install the language server with NPM. ```sh -npm install -g typescript typescript-language-server +# For C development this installs C LSP. +sudo dnf install clang-tools-extra ``` I am still getting used to the keyboard shortcuts and getting better. What Helix diff --git a/index.html b/index.html index 9edce32..08bb037 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ layout: index

    You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you.

    - + Latest experiment: Examine graphical representations of binary files using diagrams that illustrate connections between pairs of bytes (digraphs) and triplets of bytes (trigraphs). -- cgit v1.2.3