From 1a08cda0b809b104d1de79062f5fee1a07b6e0ec Mon Sep 17 00:00:00 2001 From: Gabe Venberg <gabevenberg@gmail.com> Date: Thu, 20 Mar 2025 16:39:28 +0100 Subject: [PATCH] added draft versions of Paged Out! articles. --- content/posts/nixos-easy-host.md | 80 +++++++++ content/posts/stop-using-TRRS/4C4P.jpg | Bin 0 -> 5906 bytes content/posts/stop-using-TRRS/index.md | 62 +++++++ .../trrs_fully_plugged_in_5v_sleeve.svg | 160 ++++++++++++++++++ .../trrs_fully_plugged_in_5v_tip.svg | 160 ++++++++++++++++++ .../trrs_partially_plugged_in_5v_sleeve.svg | 160 ++++++++++++++++++ .../trrs_partially_plugged_in_5v_tip.svg | 160 ++++++++++++++++++ hugo.toml | 6 + 8 files changed, 788 insertions(+) create mode 100644 content/posts/nixos-easy-host.md create mode 100644 content/posts/stop-using-TRRS/4C4P.jpg create mode 100644 content/posts/stop-using-TRRS/index.md create mode 100644 content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_sleeve.svg create mode 100644 content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_tip.svg create mode 100644 content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_sleeve.svg create mode 100644 content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_tip.svg diff --git a/content/posts/nixos-easy-host.md b/content/posts/nixos-easy-host.md new file mode 100644 index 0000000..0e37cfd --- /dev/null +++ b/content/posts/nixos-easy-host.md @@ -0,0 +1,80 @@ ++++ +title = "Running non Nixpkgs services on NixOS, the lazy way" +date = 2025-03-20T14:09:14+01:00 +draft = true ++++ + +NixOS is really nice for self hosting. +Anything that has a NixOS module can be hosted in a few lines of nix code. +But what if the service we want to host doesn't come with a NixOS module written for us already in Nixpkgs? +This is where NixOS can be a little hard, as a guide on setting up a service in Debian or Arch will rarely work on NixOS. +Of course, the 'nix way' would be to write your own package and module for it, but that can be a daunting task. +Here are some 'escape hatches' to host some of the simpler services without having to write your own Nix package or module. + +## Nginx + +If the application is a simple static website, containing just HTML and JS, +the `nginx` module on NixOS provides us with a way to manage virtual hosts complete with https. +Shown is how I host my Hugo generated blog. + +```nix +{ config, ... }: { + services.nginx.virtualHosts."gabevenberg.com" = { + enableACME = true; + forceSSL = true; + root = "/var/www/gabevenberg.com"; + }; + security.acme = { + acceptTerms = true; + defaults.email = "myname@example.com"; + }; + networking.firewall.allowedTCPPorts = [443 80]; +} +``` +The complete list of options for virtual hosts can be found [here](https://nixos.org/manual/nixos/stable/options#opt-services.nginx.virtualHosts) + +## Docker +If the service publishes a Docker image, one can just run that on NixOS. +Here's how I host a game server using a premade docker container. +Things get a bit more complicated with docker-compose, +but one can use [compose2nix](https://github.com/aksiksi/compose2nix) to translate a docker-compose.yaml file into a nix file much like the one shown. +```nix +{ config, ... }: { + virtualisation.oci-containers = { + backend = "docker"; + containers.factorio = { + image = "factoriotools/factorio:stable"; + volumes = ["/storage/factorio:/factorio"]; + hostname = "factorio"; + ports = ["34197:34197/tcp"]; + environment = {UPDATE_MODS_ON_START = "true";}; + }; + }; + virtualisation.docker.enable = true; +} +``` + +There are, of course, more options for the oci-containers module, found [here](https://nixos.org/manual/nixos/stable/options#opt-virtualisation.oci-containers.containers) + +## Systemd + +Finally, if the service is composed of a single static binary, NixOS makes it really easy to write Systemd services. +(I've used a package in Nixpkgs here, +but you could just as easily point the Systemd service to a binary you threw in `/opt/` or somewhere.) + +```nix +{ config, ... }: { + systemd.services.miniserve = { + wantedBy = ["multi-user.target"]; + after = ["network.target"]; + description = "A directory miniserve instance"; + environment = {MINISERVE_ENABLE_TAR_GZ="true";} + serviceConfig.ExecStart = "${pkgs.miniserve}/bin/miniserve -i 127.0.0.1 -- /storage/miniserve" + }; +} + +``` +And like the last 2 times, the complete list of options for Systemd service can be found [here](https://nixos.org/manual/nixos/stable/options.html#opt-systemd.services) + + +*(This article was originally published in issue #6 of the [Paged Out!](https://pagedout.institute/) magazine.)* diff --git a/content/posts/stop-using-TRRS/4C4P.jpg b/content/posts/stop-using-TRRS/4C4P.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b37c99c0c665037347900378f79aac565d920439 GIT binary patch literal 5906 zcmb7IXIK+k*G-{GO+qiyk$`{%1OcT>=b|Vez4s<XK`a*uMUakk5osa{q6vyLMIeAu zgoK1p6%ayEk)kLno_D<Wxo`RYeLFKxeoSVbwa!_4tvvw~U=D_|G_^2=!QpV2IrM>n zX_zq#i9q~5pkjg!W;SMKCMITfR#p}^PIgXC4t5R>E^Z8piyO_&!GRJ$p?UfE`T03{ z1ce0ngfM*ke7_$8M?&{7G4Eq$-p9wq!NvFgF3=4_v%xxG3?y6{hCsuSXgDCjL|`xk z5(4{Q1xG*_S)gme5R2dSf3JaA7!!;KOu;yja2NuGM8RP2&z^+J3SOoJgOk!k%a-2U zbUx)%)JFCKinIN0o@?88vEmr5H=zmiA~5<nP`y$E5o8F%vpw0TYC%*IP)^O)%B|PS z6!UqlQnq9r^zpTs?CNbm{wx__pkTlx$z%jGKzQcoZ1^uNc#M~6_hO#USPC9(JiFN6 zH14M>oYe^^pRu?KX`CFKO9SD_f;pxW9zc#;Yb%R={qf5#FS^~-<4k!O;oZ8;gXf8{ zf@a5CW9nLpz}Tl;TyrjGdIcZsw4j2@5_R(aukc3ap2mT=5c(nh5A9K|_QPLx=V|1L zbIHToE5$GlK>e7y4BeC3WP4s(ETrV5e=B|DolE~EzISp(UMnU-mm)r1zu4^YmdD;% z{T{Y2_$9@pW?wv@eUyz_8AW(rb9&WtTX&hZH7zsud28TnbX!};bNa)i08;=vBi|-+ zk;4H`9Mi0#ICJ2uUV!lrnNce#S5bcL2ksUzzK0(b!cL3t*FoKVuuN5X=t16o@FZl~ zIF{SG0GUdFU5Dud`p1mr$9F_BqZ%IGuGed_*Yq!8kY{^_?86&xgl*FaVXrHF^9f=G zC^n{-u!msulf2lP#z4J*i&}_GBDL`r_p-(fTA|g>hx_MUYv<Skjcim?lEyH>FN^>T zkUwQOuaQM@KC9%0ZNIRKq&vb+y7ud(g?Psq&u+<mmY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{m116IUB;`*9Ip`-T4r LsqUS`2{8FD?ltxS literal 0 HcmV?d00001 diff --git a/content/posts/stop-using-TRRS/index.md b/content/posts/stop-using-TRRS/index.md new file mode 100644 index 0000000..62955d4 --- /dev/null +++ b/content/posts/stop-using-TRRS/index.md @@ -0,0 +1,62 @@ ++++ +title = "Stop Using TRRS for Split-Keyboard Interconnects!" +date = 2025-03-20T14:10:01+01:00 +draft = true ++++ + + +TRRS (Tip Ring Ring Sleeve, or, as you may know it, "headphone jack with microphone support") cables have long been the go to connector between split keyboard halves. +They are cheap, compact, and thanks to their popularity, come in a variety of aesthetic styles. + +However, TRRS jacks were only designed for passive electrical components, and expose one large flaw when used actively. +When a TRRS cable is (dis)connected, the tip of the plug will slide past every single contact of the jack. +Likewise, the first contact of the jack will slide past every contact of the plug. + +To illustrate this, let us consider a TRRS setup where 5v is applied to the tip. +In this example, assume this plug is on the passive side of the board, receiving power from the active side plugged into USB. +When fully plugged in @5v_plugged_in, everything is connected properly. +However, when pulled out, 5v immediately makes contact with the TX line @5v_partial_plug. + + +5v tip TRRS fully plugged in + + +A 5v tip TRRS starting to be pulled out. Notice the short between 5v and Tx + +When the 5v Aurdino Pro Micro dominated as a keyboard MCU, a brief short between 5v and Tx/Rx may have been acceptable. +However, due to the emergence of RP2040 powered drop in replacements for the Pro Micro, such as the Elite-pi or KB2040, +3.3v logic levels are now commonplace among keyboards. +Thus, shorting the 5v power line with a logic pin is a surefire way to burn out at least a GPIO, if not your whole MCU. + +Now, what if we put the 5v at the base, so that it is the first pin disconnected? + + +A GND tip TRRS fully plugged in + + +A GND tip TRRS starting to be pulled out. Notice the short between 5v and Rx. + +In this case, we are looking at the active side of the board, connected to USB, and supplying power to the passive side. +Now, when unplugged the 5v contact of the jack will immediately make contact with the Rx line, +pulling it up to 5v and damaging the pin on the passive side of the board. + +No matter what order we put the contacts in, +one end of the TRRS cable will be unsafe to unplug while powered. +No other electronics found in your home suffer permanent damage from simply being unplugged in the wrong order. +In a moment of carelessness or forgetfulness, damage to hardware could easily happen. + +So what are the alternatives? +USB-C, while almost as small as TRRS, are more expensive component wise and and +having the same connector for board-to-board and PC-to-board connections may lead to user error. +There are also a wide variety of JST and Molex connectors, some of which rival TRRS in size, +but premade cables are not readily available, +and many connectors have a tendency to work themselves loose over time. +My personal favorite are 4P4C connectors, also known as RJ9, RJ10, or RJ22. +While bulky on the PCB, the connection is sturdy, cables are availible, and one can make ones own cables with a cheap crimping tool. +{{<figure src="./4C4P.jpg" title="A 4C4P connector (Wikimedia, CC-BY-SA 3.0)" width="50%">}} +There are of course other connectors, and any with at least 4 conductors will work for a split keyboard. +Unfortunately, there does not seem to be a perfect connector, but there are many alternatives better than TRRS. + +*This article is dedicated to the late pin D26 of Jonathan's Ferris Sweep. He is forever grateful that the Elite-pi has extra GPIOs.* + +*(This article was originally published in issue #6 of the [Paged Out!](https://pagedout.institute/) magazine.)* diff --git a/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_sleeve.svg b/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_sleeve.svg new file mode 100644 index 0000000..b2528b2 --- /dev/null +++ b/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_sleeve.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + height="50mm" + viewBox="-10 0 55.307693 20.299997" + version="1.1" + style="background-color:white" + id="svg1" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1" /> + <g + id="layer1" + transform="translate(-46.842306,-23.849998)"> + <g + id="g8" + transform="translate(36.999998,4.0000007)"> + <rect + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3" + id="rect5" + width="45.000004" + height="19.999996" + x="10" + y="19.999996" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469" + id="text1-6"><tspan + id="tspan1-1" + style="stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215" + id="text2-0"><tspan + id="tspan2-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784" + id="text3-3"><tspan + id="tspan3-2" + style="stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891" + id="text4-0"><tspan + id="tspan4-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891">Gnd</tspan></text> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 20,19.999997 V 39.999994" + id="path6" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 30,19.999997 V 39.999994" + id="path7" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 40.000002,19.999997 V 39.999994" + id="path8" /> + </g> + </g> + <g + id="layer2" + transform="translate(-46.842306,-23.849998)"> + <g + id="g6" + style="stroke-width:0.3;stroke-dasharray:none" + transform="matrix(1.0512821,0,0,1.0512821,36.48718,2.7179467)"> + <g + id="g5" + style="stroke-width:0.3;stroke-dasharray:none"> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="m 10,24.999996 h 28.536586 c 0,0 3.804879,1.902439 3.804879,1.902439 l 5.707315,-1.902439 1.902442,3.804878 v 1.902438 L 48.04878,34.51219 42.341465,32.609751 38.536586,34.51219 H 10 Z" + id="path1" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 19.512195,24.999996 V 34.51219" + id="path2" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 29.024391,24.999996 V 34.51219" + id="path3" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 38.536586,24.999996 V 34.51219" + id="path4" /> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678" + id="text1"><tspan + id="tspan1" + style="stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585" + id="text2"><tspan + id="tspan2" + style="stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047" + id="text3"><tspan + id="tspan3" + style="stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205" + id="text4"><tspan + id="tspan4" + style="stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82223px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" + id="text5"><tspan + id="tspan5" + style="stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" /></text> + </g> + </g> +</svg> diff --git a/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_tip.svg b/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_tip.svg new file mode 100644 index 0000000..581208d --- /dev/null +++ b/content/posts/stop-using-TRRS/trrs_fully_plugged_in_5v_tip.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + height="50mm" + viewBox="-10 0 55.307693 20.299997" + version="1.1" + style="background-color:white" + id="svg1" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1" /> + <g + id="layer1" + transform="translate(-46.842306,-23.849998)"> + <g + id="g8" + transform="translate(36.999998,4.0000007)"> + <rect + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3" + id="rect5" + width="45.000004" + height="19.999996" + x="10" + y="19.999996" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469" + id="text1-6"><tspan + id="tspan1-1" + style="stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215" + id="text2-0"><tspan + id="tspan2-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784" + id="text3-3"><tspan + id="tspan3-2" + style="stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891" + id="text4-0"><tspan + id="tspan4-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891">5v</tspan></text> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 20,19.999997 V 39.999994" + id="path6" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 30,19.999997 V 39.999994" + id="path7" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 40.000002,19.999997 V 39.999994" + id="path8" /> + </g> + </g> + <g + id="layer2" + transform="translate(-46.842306,-23.849998)"> + <g + id="g6" + style="stroke-width:0.3;stroke-dasharray:none" + transform="matrix(1.0512821,0,0,1.0512821,36.48718,2.7179467)"> + <g + id="g5" + style="stroke-width:0.3;stroke-dasharray:none"> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="m 10,24.999996 h 28.536586 c 0,0 3.804879,1.902439 3.804879,1.902439 l 5.707315,-1.902439 1.902442,3.804878 v 1.902438 L 48.04878,34.51219 42.341465,32.609751 38.536586,34.51219 H 10 Z" + id="path1" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 19.512195,24.999996 V 34.51219" + id="path2" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 29.024391,24.999996 V 34.51219" + id="path3" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 38.536586,24.999996 V 34.51219" + id="path4" /> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678" + id="text1"><tspan + id="tspan1" + style="stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585" + id="text2"><tspan + id="tspan2" + style="stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047" + id="text3"><tspan + id="tspan3" + style="stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205" + id="text4"><tspan + id="tspan4" + style="stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82223px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" + id="text5"><tspan + id="tspan5" + style="stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" /></text> + </g> + </g> +</svg> diff --git a/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_sleeve.svg b/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_sleeve.svg new file mode 100644 index 0000000..07d5370 --- /dev/null +++ b/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_sleeve.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + height="50mm" + viewBox="0 0 55.307693 20.299997" + version="1.1" + style="background-color:white" + id="svg1" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1" /> + <g + id="layer1" + transform="translate(-36.842309,-23.849998)"> + <g + id="g8" + transform="translate(36.999998,4.0000007)"> + <rect + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3" + id="rect5" + width="45.000004" + height="19.999996" + x="10" + y="19.999996" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469" + id="text1-6"><tspan + id="tspan1-1" + style="stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215" + id="text2-0"><tspan + id="tspan2-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784" + id="text3-3"><tspan + id="tspan3-2" + style="stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891" + id="text4-0"><tspan + id="tspan4-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891">Gnd</tspan></text> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 20,19.999997 V 39.999994" + id="path6" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 30,19.999997 V 39.999994" + id="path7" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 40.000002,19.999997 V 39.999994" + id="path8" /> + </g> + </g> + <g + id="layer2" + transform="translate(-36.842309,-23.849998)"> + <g + id="g6" + style="stroke-width:0.3;stroke-dasharray:none" + transform="matrix(1.0512821,0,0,1.0512821,26.487178,2.7179471)"> + <g + id="g5" + style="stroke-width:0.3;stroke-dasharray:none"> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="m 10,24.999996 h 28.536586 c 0,0 3.804879,1.902439 3.804879,1.902439 l 5.707315,-1.902439 1.902442,3.804878 v 1.902438 L 48.04878,34.51219 42.341465,32.609751 38.536586,34.51219 H 10 Z" + id="path1" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 19.512195,24.999996 V 34.51219" + id="path2" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 29.024391,24.999996 V 34.51219" + id="path3" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 38.536586,24.999996 V 34.51219" + id="path4" /> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678" + id="text1"><tspan + id="tspan1" + style="stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585" + id="text2"><tspan + id="tspan2" + style="stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047" + id="text3"><tspan + id="tspan3" + style="stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205" + id="text4"><tspan + id="tspan4" + style="stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82223px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" + id="text5"><tspan + id="tspan5" + style="stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" /></text> + </g> + </g> +</svg> diff --git a/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_tip.svg b/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_tip.svg new file mode 100644 index 0000000..91c2eae --- /dev/null +++ b/content/posts/stop-using-TRRS/trrs_partially_plugged_in_5v_tip.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + height="50mm" + viewBox="0 0 55.307693 20.299997" + version="1.1" + style="background-color:white" + id="svg1" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs1" /> + <g + id="layer1" + transform="translate(-36.842309,-23.849998)"> + <g + id="g8" + transform="translate(36.999998,4.0000007)"> + <rect + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3" + id="rect5" + width="45.000004" + height="19.999996" + x="10" + y="19.999996" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469" + id="text1-6"><tspan + id="tspan1-1" + style="stroke-width:0.315385;stroke-dasharray:none" + x="13.470504" + y="39.411469">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215" + id="text2-0"><tspan + id="tspan2-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="23.084501" + y="39.490215">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784" + id="text3-3"><tspan + id="tspan3-2" + style="stroke-width:0.315385;stroke-dasharray:none" + x="33.251343" + y="39.483784">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.21421px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891" + id="text4-0"><tspan + id="tspan4-6" + style="stroke-width:0.315385;stroke-dasharray:none" + x="41.831974" + y="39.552891">5v</tspan></text> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 20,19.999997 V 39.999994" + id="path6" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 30,19.999997 V 39.999994" + id="path7" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 40.000002,19.999997 V 39.999994" + id="path8" /> + </g> + </g> + <g + id="layer2" + transform="translate(-36.842309,-23.849998)"> + <g + id="g6" + style="stroke-width:0.3;stroke-dasharray:none" + transform="matrix(1.0512821,0,0,1.0512821,26.487178,2.7179471)"> + <g + id="g5" + style="stroke-width:0.3;stroke-dasharray:none"> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="m 10,24.999996 h 28.536586 c 0,0 3.804879,1.902439 3.804879,1.902439 l 5.707315,-1.902439 1.902442,3.804878 v 1.902438 L 48.04878,34.51219 42.341465,32.609751 38.536586,34.51219 H 10 Z" + id="path1" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 19.512195,24.999996 V 34.51219" + id="path2" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 29.024391,24.999996 V 34.51219" + id="path3" /> + <path + style="fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + d="M 38.536586,24.999996 V 34.51219" + id="path4" /> + </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678" + id="text1"><tspan + id="tspan1" + style="stroke-width:0.3;stroke-dasharray:none" + x="13.616014" + y="30.651678">Gnd</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585" + id="text2"><tspan + id="tspan2" + style="stroke-width:0.3;stroke-dasharray:none" + x="22.761036" + y="30.726585">Rx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047" + id="text3"><tspan + id="tspan3" + style="stroke-width:0.3;stroke-dasharray:none" + x="32.431934" + y="30.72047">Tx</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.05742px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205" + id="text4"><tspan + id="tspan4" + style="stroke-width:0.3;stroke-dasharray:none" + x="40.593998" + y="30.786205">5v</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82223px;font-family:'Libertinus Sans';-inkscape-font-specification:'Libertinus Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#3f40a8;fill-opacity:0;stroke:#000000;stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" + id="text5"><tspan + id="tspan5" + style="stroke-width:0.3;stroke-dasharray:none" + x="23.552603" + y="9.9999981" /></text> + </g> + </g> +</svg> diff --git a/hugo.toml b/hugo.toml index a69896e..6bb407f 100644 --- a/hugo.toml +++ b/hugo.toml @@ -112,6 +112,12 @@ endLevel = 5 ordered = false startLevel = 2 +[markup.goldmark] +[markup.goldmark.parser] +[markup.goldmark.parser.attribute] +block = true +title = true + [security] enableInlineShortcodes = true