Add new article

This commit is contained in:
Shav Kinderlehrer 2024-04-09 15:09:52 -04:00
parent 3504c24131
commit 034313e113
44 changed files with 65 additions and 2 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
.npmrc Normal file → Executable file
View File

0
README Normal file → Executable file
View File

0
articles/A Loveletter to the Internet.md Normal file → Executable file
View File

0
articles/All the Manpages.md Normal file → Executable file
View File

0
articles/Color Themes From Images.md Normal file → Executable file
View File

0
articles/Creating The Curio.md Normal file → Executable file
View File

0
articles/Journaling as a Programmer.md Normal file → Executable file
View File

0
articles/Learning to Code.md Normal file → Executable file
View File

0
articles/Linkpage.md Normal file → Executable file
View File

0
articles/Programmer Pastimes.md Normal file → Executable file
View File

0
articles/Programming Languages.md Normal file → Executable file
View File

0
articles/Routing in Svelte.md Normal file → Executable file
View File

View File

@ -0,0 +1,24 @@
Lately, I've been interested in improving my URL shortener hosted at [https://trkt.in](https://trkt.in). So I did!
I present.. **Chela!**
I named Chela off of the small claw on crabs because it's like the little claw compared to the big one. Ok, I admit the name is vague but I think it's cute.
I built Chela in Rust using Axum as a server framework. It runs off of a Postgres database. It's very simple by design and also very fast. Using `curl`, I get a response in around a millisecond typically.
In my previous iteration of this project, I rather lazily generated IDs by hashing the URLs and then taking the first four or so letters. It was ugly and at increasing risk of collision.
In this new iteration, I'm using [Sqids](https://sqids.org/) to generate IDs. It's better, faster (I think), and it looks prettier.
For example,
- [https://trkt.in/2614aab104d](https://trkt.in/2614aab104d)
- [https://trkt.in/WX](https://trkt.in/WX)
These both link to the same website (my previous blog post), but one of them is a whole lot easier to remember.
Also, this new version supports the `+` feature from bit.ly, where if you put a plus sign at the end of a URL it will show you what it links to. Try it!
I made the Docker image for Chela as small as I could without going off the deep end. The Chela binary is around 5Mb, and the full Docker image is just about 14Mb not including the Postgres dependency.
If you're interested, feel free to check it out here: [https://trkt.in/oz](https://trkt.in/oz).

0
articles/Writing Your First Kakoune Config (kakrc).md Normal file → Executable file
View File

0
articles/Writing a URL Shortener.md Normal file → Executable file
View File

0
articles/img/kakrc-guide/default-kakrc.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

0
articles/img/kakrc-guide/final-kakrc.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

0
articles/img/kakrc-guide/show-matching-after.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
articles/img/kakrc-guide/show-matching-before.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

0
feeds/makeFeeds.ts Normal file → Executable file
View File

0
feeds/package.json Normal file → Executable file
View File

0
feeds/yarn.lock Normal file → Executable file
View File

0
package.json Normal file → Executable file
View File

0
src/app.d.ts vendored Normal file → Executable file
View File

0
src/app.html Normal file → Executable file
View File

0
src/lib/index.ts Normal file → Executable file
View File

0
src/lib/util/article.ts Normal file → Executable file
View File

0
src/lib/util/firebase.ts Normal file → Executable file
View File

0
src/lib/util/store.ts Normal file → Executable file
View File

0
src/routes/+layout.svelte Normal file → Executable file
View File

0
src/routes/+page.svelte Normal file → Executable file
View File

0
src/routes/+page.ts Normal file → Executable file
View File

0
src/routes/app.css Normal file → Executable file
View File

0
src/routes/articles/[slug]/+layout.svelte Normal file → Executable file
View File

0
src/routes/articles/[slug]/+layout.ts Normal file → Executable file
View File

0
src/routes/articles/[slug]/+page.svelte Normal file → Executable file
View File

0
src/routes/articles/[slug]/+page.ts Normal file → Executable file
View File

0
static/favicon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

43
static/rss.xml Normal file → Executable file
View File

@ -6,8 +6,8 @@
<link>https://blog.trinket.icu</link>
<description>Light Blog - My tech ramblings about everything under the sun.</description>
<language>en-us</language>
<copyright>© 2023 Shav Kinderlehrer</copyright>
<pubDate>Sun, 15 Oct 2023 19:00:00 GMT</pubDate>
<copyright>© 2024 Shav Kinderlehrer</copyright>
<pubDate>Tue, 09 Apr 2024 19:00:00 GMT</pubDate>
<generator>jsonfeed-to-rss 3.0.7 (https://github.com/bcomnes/jsonfeed-to-rss#readme)</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<image>
@ -15,6 +15,45 @@
<link>https://blog.trinket.icu</link>
<title>Light Blog</title>
</image>
<item>
<title>Updated URL Shortener</title>
<link>https://lightblog.dev/articles/updated-url-shortener</link>
<dc:creator>Shav Kinderlehrer</dc:creator>
<description>Lately, I've been interested in improving my URL shortener hosted at https://trkt.in. So I did!
I present.. Chela!
I named Chela off of the small claw on crabs because it's like the little claw compared to the big one. Ok, I admit the name is vague but I think it's cute.
I built Chela in Rust using Axum as a server framework. It runs off of a Postgres database. It's very simple by design and also very fast. Using curl, I get a response in around a millisecond typically.
In my previous iteration of this project, I rather lazily generated IDs by hashing the URLs and then taking the first four or so letters. It was ugly and at increasing risk of collision.
In this new iteration, I'm using Sqids to generate IDs. It's better, faster (I think), and it looks prettier.
For example,
https://trkt.in/2614aab104d
https://trkt.in/WX
These both link to the same website (my previous blog post), but one of them is a whole lot easier to remember.
Also, this new version supports the + feature from bit.ly, where if you put a plus sign at the end of a URL it will show you what it links to. Try it!
I made the Docker image for Chela as small as I could without going off the deep end. The Chela binary is around 5Mb, and the full Docker image is just about 14Mb not including the Postgres dependency.
If you're interested, feel free to check it out here: https://trkt.in/oz.
</description>
<content:encoded><![CDATA[<p>Lately, I've been interested in improving my URL shortener hosted at <a href="https://trkt.in">https://trkt.in</a>. So I did!</p>
<p>I present.. <strong>Chela!</strong></p>
<p>I named Chela off of the small claw on crabs because it's like the little claw compared to the big one. Ok, I admit the name is vague but I think it's cute.</p>
<p>I built Chela in Rust using Axum as a server framework. It runs off of a Postgres database. It's very simple by design and also very fast. Using <code>curl</code>, I get a response in around a millisecond typically.</p>
<p>In my previous iteration of this project, I rather lazily generated IDs by hashing the URLs and then taking the first four or so letters. It was ugly and at increasing risk of collision.</p>
<p>In this new iteration, I'm using <a href="https://sqids.org/">Sqids</a> to generate IDs. It's better, faster (I think), and it looks prettier.</p>
<p>For example,</p>
<ul>
<li><a href="https://trkt.in/2614aab104d">https://trkt.in/2614aab104d</a></li>
<li><a href="https://trkt.in/WX">https://trkt.in/WX</a></li>
</ul>
<p>These both link to the same website (my previous blog post), but one of them is a whole lot easier to remember.</p>
<p>Also, this new version supports the <code>+</code> feature from bit.ly, where if you put a plus sign at the end of a URL it will show you what it links to. Try it!</p>
<p>I made the Docker image for Chela as small as I could without going off the deep end. The Chela binary is around 5Mb, and the full Docker image is just about 14Mb not including the Postgres dependency.</p>
<p>If you're interested, feel free to check it out here: <a href="https://trkt.in/oz">https://trkt.in/oz</a>.</p>
]]></content:encoded>
<guid isPermaLink="false">updated-url-shortener</guid>
<pubDate>Tue, 09 Apr 2024 19:00:00 GMT</pubDate>
</item>
<item>
<title>Writing a URL Shortener</title>
<link>https://lightblog.dev/articles/writing-a-url-shortener</link>

0
svelte.config.js Normal file → Executable file
View File

0
tsconfig.json Normal file → Executable file
View File

0
vite.config.ts Normal file → Executable file
View File

0
yarn.lock Normal file → Executable file
View File