diff options
-rw-r--r-- | _config.yml | 8 | ||||
-rw-r--r-- | _posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md | 2 | ||||
-rw-r--r-- | _posts/2020-08-31-the-database-i-wish-i-had.md | 12 | ||||
-rw-r--r-- | _tils/2020-08-12-simple-filname-timestamp.md | 4 | ||||
-rw-r--r-- | _tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md | 2 | ||||
-rw-r--r-- | _tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md | 7 | ||||
-rw-r--r-- | _tils/2020-08-28-grep-online-repositories.md | 2 | ||||
-rw-r--r-- | a-propos.md | 18 | ||||
-rw-r--r-- | aja.md | 4 | ||||
-rw-r--r-- | default.nix | 32 | ||||
-rw-r--r-- | hea.md | 2 | ||||
-rw-r--r-- | sobre.md | 2 | ||||
-rwxr-xr-x | spelling/check-spelling.sh | 21 | ||||
-rw-r--r-- | spelling/en.txt | 33 | ||||
-rw-r--r-- | spelling/en_US.aff.txt | 10 | ||||
-rw-r--r-- | spelling/en_US.dic.txt | 11 | ||||
-rw-r--r-- | spelling/fr.txt | 8 | ||||
-rw-r--r-- | spelling/fr_FR.dic.txt | 1 | ||||
-rw-r--r-- | spelling/international.dic.txt | 50 | ||||
-rw-r--r-- | spelling/international.txt | 106 | ||||
-rw-r--r-- | spelling/pt.txt | 123 | ||||
-rw-r--r-- | spelling/pt_BR.dic.txt | 2 |
22 files changed, 338 insertions, 122 deletions
diff --git a/_config.yml b/_config.yml index b9e46ed..70f02b8 100644 --- a/_config.yml +++ b/_config.yml @@ -106,14 +106,14 @@ t: lock_icon: en: "Lock icon" pt: "Ícone de fechadura" - fr: "Ícone de verrouillage" + fr: "Icône de verrouillage" footer: en: >- - The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a>. The <a href="https://git.sr.ht/~euandreh/website">code</a> is <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 or later</a>. + The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. The <a href="https://git.sr.ht/~euandreh/website">code</a> is <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 or later</a>. pt: >- - O conteúdo deste site é licenciado sob a licença <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a>. O <a href="https://git.sr.ht/~euandreh/website">código</a> é <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 ou versões maiores</a>. + O conteúdo deste site é licenciado sob a licença <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. O <a href="https://git.sr.ht/~euandreh/website">código</a> é <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 ou versões maiores</a>. fr: >- - Le contenu de cette site est sous la licence <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a>. Le <a href="https://git.sr.ht/~euandreh/website">code</a> est <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 ou supérieur</a>. + Le contenu de cette site est sous la licence <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. Le <a href="https://git.sr.ht/~euandreh/website">code</a> est <a href="https://git.sr.ht/~euandreh/website/tree/master/LICENSE">GPLv3 ou supérieur</a>. months: en: - January diff --git a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md b/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md index dcda7f4..3ce2acf 100644 --- a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md +++ b/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md @@ -117,7 +117,7 @@ or run any `guix environment --ad-hoc my-package -- my script` :) When I originally created this code I had a reason why to have both a `sudo` call for `sudo ./scripts/install-guix.sh` and `sudo` usages inside `install-guix.sh` itself. I couldn't figure out why (it feels like my past self -was a bit smarter xD), but it feels ugly now. If it is truly required I could +was a bit smarter 😬), but it feels ugly now. If it is truly required I could add an explanation for it, or remove this entirely in favor of a more elegant solution. I could also contribute the Guix image upstream to builds.sr.ht, but there diff --git a/_posts/2020-08-31-the-database-i-wish-i-had.md b/_posts/2020-08-31-the-database-i-wish-i-had.md index 8065696..7bb0036 100644 --- a/_posts/2020-08-31-the-database-i-wish-i-had.md +++ b/_posts/2020-08-31-the-database-i-wish-i-had.md @@ -78,7 +78,7 @@ makes it inherit most of the downsides (and benefits too) of SQLite itself. [mentat]: https://github.com/mozilla/mentat Having such a requirement imposes a different approach to storage: we have to -decouple the knowledge about the intricansies of storage from the usage of +decouple the knowledge about the intricacies of storage from the usage of storage itself, so that a module (say query processing) can access storage through an API without needing to know about it's implementation. This allows the database to target a POSIX filesystems storage API and an IndexedDB storage @@ -89,10 +89,10 @@ mechanism (called [adapters][pouchdb-adapters]) and Datomic has them too (called [pouchdb-adapters]: https://pouchdb.com/adapters.html [datomic-storage-services]: https://docs.datomic.com/on-prem/storage.html -This would allow the database to adapt to where it is embedded: when targetting +This would allow the database to adapt to where it is embedded: when targeting the browser the IndexedDB storage API would provide the persistence layer that the database requires, and similarly the POSIX filesystem storage API would -provide the persistence layer when targetting POSIX systems (like desktops, +provide the persistence layer when targeting POSIX systems (like desktops, mobile, etc.). But there's also an extra restriction that comes from by being embedded: it @@ -119,11 +119,11 @@ information (datoms) and allows you to query them in a multitude of ways. Stuart Halloway calls it "accumulate-only" over "append-only"[^accumulate-only]: > It's accumulate-only, it is not append-only. So append-only, most people when -> they say that they're impliying something physical about what happens. +> they say that they're implying something physical about what happens. [datomic]: https://www.datomic.com/ [^accumulate-only]: Video "[Day of Datomic Part 2](https://vimeo.com/116315075)" - on Datomic's infomation model, at time 12:28. + on Datomic's information model, at time 12:28. Also a database can be append-only and overwrite existing information with new information, by doing clean-ups of "stale" data. I prefer to adopt the @@ -220,7 +220,7 @@ Cantrill. ### Portability -Being able to target so many differente platforms is a bold goal, and the +Being able to target so many different platforms is a bold goal, and the embedded nature of the database demands portability to be a core value. ### Integrity diff --git a/_tils/2020-08-12-simple-filname-timestamp.md b/_tils/2020-08-12-simple-filname-timestamp.md index 7c112ff..2678088 100644 --- a/_tils/2020-08-12-simple-filname-timestamp.md +++ b/_tils/2020-08-12-simple-filname-timestamp.md @@ -5,7 +5,7 @@ layout: til lang: en ref: simple-filename-timestamp --- -When writing Jekyll posts or creating logfiles with dates on them, I usually +When writing Jekyll posts or creating log files with dates on them, I usually struggle with finding a direct way of accomplishing that. There's a simple solution: `date -I`. @@ -14,7 +14,7 @@ solution: `date -I`. cp post-template.md _posts/$(date -I)-post-slug.md ``` -Using this built-in GNU/Linux tool allows you to `touch $(date -I).md` to readly +Using this built-in GNU/Linux tool allows you to `touch $(date -I).md` to readily create a `2020-08-12.md` file. I always had to read `man date` or search the web over and over, and after doing diff --git a/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md b/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md index d9181c3..bd8a072 100644 --- a/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md +++ b/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md @@ -47,7 +47,7 @@ I've derived my implementations from two "official"[^official] hooks, [^official]: I don't know how official they are, I just assumed it because they live in the same organization inside GitHub that Jekyll does. -All I did was to wrap the header tag inside an `<a>`, and set the href of that +All I did was to wrap the header tag inside an `<a>`, and set the `href` of that `<a>` to the existing id of the header. Before the hook the HTML looks like: ```html diff --git a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md index e42ce4f..8676fcb 100644 --- a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md +++ b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md @@ -54,9 +54,10 @@ specific, we need some extra parameters: git --work-tree=<dir> checkout <my-commit> -- . ``` -There's an extra `-- .` at the end, which initally looks like we're sending -morse signals to git, but we're actually saying to `git-checkout` which subdir -of `<my-commit>` we want to look at. Which means we can do something like: +There's an extra `-- .` at the end, which initially looks like we're sending +Morse signals to git, but we're actually saying to `git-checkout` which +sub directory of `<my-commit>` we want to look at. Which means we can do +something like: ```shell git --work-tree=<dir> checkout <my-commit> -- src/ diff --git a/_tils/2020-08-28-grep-online-repositories.md b/_tils/2020-08-28-grep-online-repositories.md index f9ef114..7860df3 100644 --- a/_tils/2020-08-28-grep-online-repositories.md +++ b/_tils/2020-08-28-grep-online-repositories.md @@ -61,7 +61,7 @@ git grep "${REGEX_PATTERN}" "${@}" ``` It is a wrapper around `git grep` that downloads the repository when missing. -Save in a file calle `git-search`, make the file executable and add it to your +Save in a file called `git-search`, make the file executable and add it to your path. Overview: diff --git a/a-propos.md b/a-propos.md index c486d35..2c02e4b 100644 --- a/a-propos.md +++ b/a-propos.md @@ -4,29 +4,29 @@ title: À propos lang: fr ref: about --- -Salut, je suis EuAndreh. J'ecris logiciel et parfois musique. Vous pouvez -rencontrer de donnés pour me contacter au bas cette de page, ou vouz pouvez -également envoyer une message dans ma [boîte de récepcion publique][0]. +Salut, je suis EuAndreh. J'écris logiciel et parfois musique. Vous pouvez +rencontrer de donnés pour me contacter au bas cette de page, ou vous pouvez +également envoyer une message dans ma [boîte de réception publique][0]. [0]: mailto:~euandreh/public-inbox@lists.sr.ht -Ceci est mon site personnel où j'ecris des articles, publie des logicieles et +Ceci est mon site personnel où j'écris des articles, publie des logicielles et d'autres travaux connexes. -Ci-dessous vouz trouvez des projècts interresants de moi. +Ci-dessous vous trouvez des projets intéressants de moi. ## Projets de logiciels ### [boneco](https://boneco.euandreh.xyz) -Page simple pour générér des versions pliables pour l'impression de fichiers PDF +Page simple pour générer des versions pliables pour l'impression de fichiers PDF directement dans le navigateur (en portugais). ### [Songbooks](https://songbooks.euandreh.xyz) -Site web por gérer, transposer et distribuer les musiques LilyPond e -regrouper-les en utilisánt LaTeX dans recueils de chansons. Visite la version -demo sur [songbooks-demo.euandreh.xyz][1] ou la version de production avec +Site web pour gérer, transposer et distribuer les musiques LilyPond e +regrouper-les en utilisant LaTeX dans recueils de chansons. Visite la version +démo sur [songbooks-demo.euandreh.xyz][1] ou la version de production avec répertoire religieux sur [hinarioespirita.org][2]. [1]: https://songbooks-demo.euandreh.xyz @@ -1,10 +1,10 @@ --- -title: Aujourd'hui J'Appris +title: Aujourd'hui J' Appris layout: tils-listing lang: fr ref: tils --- -**A**ujourd'hui **J**'**A**ppris (de l'anglais, _**T**oday **I** **L**earned_): +**A**ujourd'hui **J**' **A**ppris (de l'anglais, _**T**oday **I** **L**earned_): petites postes de connaissances utiles. Copie éhontée de [Anna e só](https://til.flourishing.stream/). diff --git a/default.nix b/default.nix index 2d35725..c20c47e 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,30 @@ let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") { }; + dicts = rec { + mkDict = let + prefix = + "https://raw.githubusercontent.com/wooorm/dictionaries/61016e00e276f9bf5e52cbc6c02a45f2e49b2c7e/dictionaries"; + in lang: + pkgs.stdenv.mkDerivation { + name = "songbooks-dict-${lang}"; + builder = builtins.toFile "builder.sh" '' + source $stdenv/setup + install -dm755 $out/share/hunspell + install -m644 ${ + builtins.fetchurl "${prefix}/${lang}/index.dic" + } $out/share/hunspell/${lang}.dic + install -m644 ${ + builtins.fetchurl "${prefix}/${lang}/index.aff" + } $out/share/hunspell/${lang}.aff + runHook postInstall + ''; + }; + pt = mkDict "pt"; + en = mkDict "en"; + fr = mkDict "fr"; + }; + myHunspell = (pkgs.hunspellWithDicts (with dicts; [ en pt fr ])); in rec { utils = import ./utils.nix { pkgs = pkgs; @@ -16,8 +40,7 @@ in rec { subtasks = rec { hunspellCheck = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-hunspell"; - buildInputs = baseAttrs.buildInputs - ++ [ (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) ]; + buildInputs = baseAttrs.buildInputs ++ [ myHunspell ]; buildPhase = '' patchShebangs . ./spelling/check-spelling.sh "${subtasks.docs}" @@ -60,10 +83,7 @@ in rec { ]; shell = pkgs.mkShell rec { name = "website-shell"; - buildInputs = [ - jekyllEnv - (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) - ]; + buildInputs = [ jekyllEnv myHunspell ]; }; publishScript = utils.overwritingPublishScript { docsDerivation = subtasks.docs; @@ -4,6 +4,6 @@ layout: tils-listing lang: pt ref: tils --- -**H**oje **E**u **A**prendi (do inglês, _**T**oday **I** **L**earned_): pequenas postages de conhecimentos úteis. +**H**oje **E**u **A**prendi (do inglês, _**T**oday **I** **L**earned_): pequenas postagens de conhecimentos úteis. Cópia descarada da [Anna e só](https://til.flourishing.stream/). @@ -10,7 +10,7 @@ mensagem para minha [caixa de entrada pública][0]. [0]: mailto:~euandreh/public-inbox@lists.sr.ht -Esse é o meu site pessoal onde eu escrevo artigos, publico software e outros +Esse é o meu site pessoal onde eu escrevo artigos, público software e outros trabalhos relacionados. Abaixo você encontra alguns projetos interessantes meus. diff --git a/spelling/check-spelling.sh b/spelling/check-spelling.sh index 653a5f9..3ddfd2a 100755 --- a/spelling/check-spelling.sh +++ b/spelling/check-spelling.sh @@ -11,22 +11,21 @@ HTML_DIR="${1:-}" export LANG=C.UTF-8 for DICT in spelling/*.txt; do - diff <(sort "$DICT") "$DICT" || { + diff <(sort "$DICT" | uniq) "$DICT" || { echo "The $DICT dictionary is unsorted. To fix it, run:" >&2 - echo " LANG=C.UTF-8 sort $DICT | sponge $DICT" >&2 + echo " LANG=C.UTF-8 sort $DICT | uniq | sponge $DICT" >&2 exit 1 } done -finish() { - rm -f spelling.txt - rm -f dicts.txt -} -trap finish EXIT - -cat spelling/*.txt > dicts.txt - -find "${HTML_DIR}" -type f -name '*.html' | grep -v pastebin | hunspell -l -p dicts.txt -d fr_FR -d en_US -i utf-8 >> spelling.txt +rm -f spelling.txt +shopt -s globstar +for f in "${HTML_DIR}"/**/*.html; do + if ! grep -E '/pastebin(/|s.html)' <(echo "$f") > /dev/null; then + l="$(head -n2 "$f" | tail -n1 | cut -d\" -f2)" + hunspell -u3 -H -d "$l" -p <(cat spelling/international.txt "spelling/$l.txt") "$f" | tee -a spelling.txt + fi +done if [[ -s spelling.txt ]]; then printf "\nvvv Mispelled words detected by hunspell.\n\n" >&2 diff --git a/spelling/en.txt b/spelling/en.txt new file mode 100644 index 0000000..b4a2e52 --- /dev/null +++ b/spelling/en.txt @@ -0,0 +1,33 @@ +aren +autocommit +couldn +curation +declaratively +decrypting +didn +doesn +duplications +embeddable +filesystem +filesystems +isn +maintainence +oday +portuguese +portuguse +pre +programmatically +realising +reimplementation +repo +reproducibility +scriptable +shouldn +symlinks +syncable +só +tradeoffs +untrusted +ve +wasn +wouldn diff --git a/spelling/en_US.aff.txt b/spelling/en_US.aff.txt deleted file mode 100644 index 827c34f..0000000 --- a/spelling/en_US.aff.txt +++ /dev/null @@ -1,10 +0,0 @@ -aren -couldn -didn -doesn -isn -pre -sr -ve -wasn -wouldn diff --git a/spelling/en_US.dic.txt b/spelling/en_US.dic.txt deleted file mode 100644 index 90a7531..0000000 --- a/spelling/en_US.dic.txt +++ /dev/null @@ -1,11 +0,0 @@ -autocommit -curation -declaratively -decrypting -programmatically -realising -repo -reproducibility -scriptable -symlinks -tradeoffs diff --git a/spelling/fr.txt b/spelling/fr.txt new file mode 100644 index 0000000..aa09184 --- /dev/null +++ b/spelling/fr.txt @@ -0,0 +1,8 @@ +' +AJA +dimanche +earned +oday +ppris +só +ujourd'hui diff --git a/spelling/fr_FR.dic.txt b/spelling/fr_FR.dic.txt deleted file mode 100644 index b402cff..0000000 --- a/spelling/fr_FR.dic.txt +++ /dev/null @@ -1 +0,0 @@ -dimanche diff --git a/spelling/international.dic.txt b/spelling/international.dic.txt deleted file mode 100644 index f3637be..0000000 --- a/spelling/international.dic.txt +++ /dev/null @@ -1,50 +0,0 @@ -144p -250GB -32GB -500GB -81F90EC3CD356060 -8GB -André -BSON -CI -EuAndreh -Fastmail -GPLv3 -GitLab -Gmail -GuixSD -JS -Lerna -Matroska -Merkle -NPM -Nextcloud -NixOS -Pastebin -Raku -SSD -Sourcehut -Spacemacs -Staltz -VPN -Yandex -YouTube -brainer -buildGoModule -ci -dl -guix -html -i5 -i7 -intbytes -js -libre -merkle -myrepos -nixos -no-brainer -npm -touchpad -v8 -youtube diff --git a/spelling/international.txt b/spelling/international.txt new file mode 100644 index 0000000..a12f150 --- /dev/null +++ b/spelling/international.txt @@ -0,0 +1,106 @@ +144p +250GB +32GB +500GB +81F90EC3CD356060 +8GB +André +Atom +B1 +BN +BSON +BY +BY-SA +CI +Cantrill +CouchDB +Datomic +EuAndreh +F +FFI +Fastmail +GPLv +GPLv3 +GTK +GitLab +Gmail +GuixSD +Halloway +IndexedDB +JS +Joyent +L1 +LaTeX +Lerna +LilyPond +Matroska +Mentat +Merkle +NPM +Nextcloud +NixOS +POSIX +Pastebin +PouchDB +RSS +Raku +SA +SSD +Sourcehut +Spacemacs +StackOverflow +Staltz +TAB +TBs +VPN +WebAssembly +Yandex +YouTube +Zig +boneco +brainer +buildGoModule +cgit +ci +datalog +datom +datoms +dl +en +euandreh +fr +gcrypt +gt +guix +guixbuild +h1 +h6 +hinarioespirita +html +i5 +i7 +intbytes +jekyll +jemoji +js +kramdown +libre +lt +merkle +myrepos +nixos +no-brainer +npm +org +pastebin +pastebins +plaintext +pt +songbooks +sourcehut +sr +systemd +touchpad +v8 +xyz +youtube diff --git a/spelling/pt.txt b/spelling/pt.txt new file mode 100644 index 0000000..07202d4 --- /dev/null +++ b/spelling/pt.txt @@ -0,0 +1,123 @@ +Abaixo +Agosto +Anna +Aprendi +Blog +Cópia +H +HEA +I +L +Lista +Me +Postado +Postagens +Quando +T +Usar +Visite +Website +achar +arquivo +artigos +buscar +chegar +comece +comentário +como +completar +conhecimentos +contatar +criar +código +da +dados +de +desta +diretamente +direto +discussão +discussões +distribuir +do +dobráveis +dou eu +e +earned +email +empacotá +encontra +engasgo +entrada +envelope +escreva +escrever +escrevo +esforço +estou +eu +existentes +extra +fazer +ficou +formatos +gerar +impressão +inglês +interessantes +internet +intervalos +jeito +las +licenciado +licença +log +los +mandar +mande +me +mensagem +na +navegador +no +nome +normalmente +novo +o +oday +oje +ordená +os +padrão +para +parar +pessoal +por +post +postagens +prendi +procurando +procure +produção +projetos +pública +público +relacionados +reler +religioso +se +significa +simples +sobre +tempo +texto +timestamp +transpor +u +usando +usar +versão +versões +Ícone +é +úteis diff --git a/spelling/pt_BR.dic.txt b/spelling/pt_BR.dic.txt deleted file mode 100644 index 7ed8a57..0000000 --- a/spelling/pt_BR.dic.txt +++ /dev/null @@ -1,2 +0,0 @@ -os -sobre |