I’m currently [[replacing-google-search-apps-with-self-hosted-web-apps]] and decided to create a simple b64 encoder/decoder, just start typing to enter text, escape to deselect, then e/d to encode/decode.
I’m trying to make these apps super simple, self hosted out of minio, static html, and javascript. It’s been fun to get back to some simple interactive web development like this. No build just a website that does something. No broken builds, no containers to deploy, just push to minio.
encoded = btoa(content); decoded = atob(encoded);
Here is the result.
In order to send data that includes special characters such as I’m working on a chrome extension to make quick blog posts, like thoughts or a persistent bookmark tool with comments. The backend is written in fastapi and when I check to see if I have a post for a page I need to url encode it. curl example generated from the fastapi swagger docs. Here is how I used javascript’s I want to incorporate some of the wonderful comments, \U0001F495, \U0001F984, and \U0001F516’s that I have been getting on dev.to on my website. I have dabbled once or twice with no avail this time I am taking notes on my journey, so follow along and let’s get there together. By the end of this post, I will have a way to get comments from posts on the client-side thanks to the wonderfully open dev.to API. I want to incorporate some of the wonderful comments, 💕, 🦄, and 🔖’s that I have been getting on dev.to on my website. I have dabbled once or twice with no avail this time I am taking notes on my journey, so follow along and let’s get there together. By the end of this post, I will have a way to get comments from posts on the client-side thanks to the wonderfully open dev.to API. dev.to has an open API that allows us to easily get comments as
2 min read
Often when reading through javascript examples you will find some arrow functions use parentheses Arrow functions are one-liner functions in javascript that have two main syntactical ways to create the code block. with parentheses and braces. Let’s take a look at both ways of creating arrow functions so that when we come accross them in the wild it will all make sense. Here is an example of an arrow function that will implicitly return the last statement without the return keyword. I believe that these are a bit more restricted in that you cannot set variables inside them. They are... ...
/ in a url you need to url encode it. You have probably seen these many times in urls with things like %20 for spaces.curl -X 'GET' \ 'https://thoughts.waylonwalker.com/link/?link=https%3A%2F%2Fhtmx.org%2Fextensions%2Fclient-side-templates%2F' \ -H 'accept: application/json'
encodeURIComponent to turn my chrome extension into a notification when I already have a post for the current page.How to get Dev Comments from an article Url
Explicit vs Implicit Returns in Javascript
() while others use braces {}. This key difference is that parentheses will implicitly return the last statement while braces require an explicit return statement. It is important to understand the difference between them because it is likely that you will find code examples of both and trying to edit code written differently than you’re used to may have unintended consequences.