summaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-05-23 00:43:15 +0100
committerdavidovski <david@davidovski.xyz>2024-05-23 00:43:15 +0100
commitb7e29e3284f7ee44503f9e3da4d7b02bb4bca29b (patch)
tree8c991629438a8b57326d9aa48b5e5ae2cfb6402c /site
parent96d83ab314b8df7cf2b815a9a29bb12d485d73ca (diff)
parentf8a06922c21b32bbf54a4b5a5552b62163feb2a3 (diff)
Merge branch 'master' of git.cheetah.remote:davidovski
Diffstat (limited to 'site')
-rwxr-xr-xsite/entries/typr.html27
-rw-r--r--site/images/typr.gifbin0 -> 1319817 bytes
-rwxr-xr-xsite/index.html9
3 files changed, 33 insertions, 3 deletions
diff --git a/site/entries/typr.html b/site/entries/typr.html
new file mode 100755
index 0000000..79b7d20
--- /dev/null
+++ b/site/entries/typr.html
@@ -0,0 +1,27 @@
+#!./entries.sh
+
+# typr.sh
+
+`typr.sh` is a typing test for your terminal
+
+Try it out by downloading [typr](https://davidovski.xyz/typr.sh) or running it directly (at ur own risk):
+
+```
+sh -c "$(curl https://davidovski.xyz/typr.sh)"
+```
+
+I decided to try and write an interactive program purely in POSIX shell, so I decided to try and create a game like [monkeytype](monkeytype.com) but for the terminal. It currently has two test modes, words and time: testing how long it takes for you to type a given amount of words and testing how many words you can type in a given amount of time respectively. You can see the options by doing `typr.sh -h`
+
+
+When i say pure POSIX shell, I mean as pure as it can get: no bashisms or gnu flags (asterix here) while avoiding forking to other programs like the plague. Some features I took as shell "builtins", being ones that are builtin to `dash`, so printf was used quite heavily.
+
+The only exceptions to the no forking rule are using `stty` to configure the terminal (though there could be other ways to do this) and `date` to get accurate time. While I did use the GNU "%N" feature of date to get the time in nanoseconds, this is entirely optional and the program should work without this, though will suffer from slightly less precision.
+
+Instead of using ncurses (tput) I decided to just embed all of the escape sequences directly in the strings printed. This might make it a bit difficult to open the script in some editors, but it means that there is one less dependency, so hopefully it will run on most places easier.
+
+I've not tested it on many machines, but I'm curious to see how well it works on different configurations, so please try it out and tell me how it works. (contact info on [index.html](/#contact)).
+
+![](/images/typr.gif)
+
+ignore me typing really slowly here this is just a test. I can type much faster than that, promise
+
diff --git a/site/images/typr.gif b/site/images/typr.gif
new file mode 100644
index 0000000..355055a
--- /dev/null
+++ b/site/images/typr.gif
Binary files differ
diff --git a/site/index.html b/site/index.html
index 54c7cd4..f40a030 100755
--- a/site/index.html
+++ b/site/index.html
@@ -40,20 +40,23 @@ cat << EOF
EOF
cat << EOF
+<<<<<<< HEAD
<div class="main-image">
<img src="/images/remotecontrol.gif">
</div>
<div>
- <h2>donate</h2>
+ <h2 id="donate">donate</h2>
<p>if you like what i do and you want to support me, consider donating <a href="https://www.getmonero.org/">Monero</a></p>
<code>49ECi71yshT6kvzFJKyvVDXLarVp9EGR54ZUw9ebqPetKn2kbaRavFG4FCG4MALkGXVZ16KM5c92MJ7vDWL7iwFs66Q1UQ2</code>
</div>
+
<div>
- <h2>contact</h2>
+ <h2 id="contact">contact</h2>
- <p>if you want to contact me, you can message me on matrix <code>@ix:davidovski.xyz</code> or via the email linked at the top of the page.</p>
+ <p>if you want to contact me, you can message me on matrix <code>@ix:davidovski.xyz</code>, XMPP <code>ix@davidovski.xyz</code>, or via the email linked at the top of the page.</p>
+ </div>
</div>
EOF