Build bots on Bluesky with Node.js and GitHub Actions
Bluesky is the new social network in town and it’s an exciting place to explore right now. I was fortunate enough to get an invite early on and take part in the early community. But Bluesky is not just a Twitter clone, it’s an application on top of The AT Protocol, a (still being built) federated protocol for social networks with some interesting properties.
Create a CLI Chatbot with the ChatGPT API and Node.js
ChatGPT has taken the world by storm and this week OpenAI released the ChatGPT API. I’ve spent some time playing with ChatGPT in the browser, but the best way to really get on board with these new capabilities is to try building something with it. With the API available, now is that time.
I recently came across this blog post from Ruud van Asseldonk titled “The yaml document from hell”. I’ve always heard that yaml has its pitfalls, but hadn’t looked into the details and thankfully hadn’t been affected, mainly due to my very infrequent and simple use of yaml. If you are in the same boat as me, I recommend reading that article now as I almost can’t believe I’ve avoided any issues with it.
Better two factor authentication experiences with WebOTP
Two factor authentication (2FA) is a great way to improve the security of user accounts in an application. It helps protect against common issues with passwords, like users picking easily guessable passwords or reusing the same password across multiple sites. There are different ways to implement two factor authentication, including SMS, using an authenticator application and WebAuthn.
Alias your Mastodon username to your own domain with Jekyll
Mastodon is different to most online services. It is a federated network, so when you set up an account you need to choose a server to use. Your username then becomes a combination of your handle and that server you signed up to. For example, I am currently @email@example.com.
How to use the Bitly API in Ruby
Link shortening has been around for a long time and Bitly is arguably the king of the link shorteners. It has support for shortening long URLs as well as custom short links, custom domains, and metrics to track how each link is performing.
Don't ever write your own function to parse URL parameters
Sometimes the platform we are building on provides more functionality than we can keep in our own heads. However, depending on the problem, we often find ourselves trying to write the code to solve the issue rather than finding and using the existing solution provided by the platform. I almost fell for this recently when trying to parse a query string.
Restart your app and not your tunnel with ngrok and nodemon
When I am developing web applications in Node.js, I like the server to restart when I make changes, so I use nodemon. When I am developing an application that consumes webhooks or that I want to share publicly, I use ngrok. In fact, I like ngrok so much, I volunteered to help maintain the Node.js wrapper for ngrok.
How to display dates in your user's time zone with the Intl API
Time zones are hard. Not only are there a lot of them, but they don’t fit nicely into whole hour blocks, daylight savings time changes individual zones some of the time, and zones move around and change all the time. In short, it is a hassle.
How to stream file downloads in Node.js with Got
Got is a Node.js library for making HTTP requests. It has both promise and stream based APIs and in this post I want to explore how to use the stream API to download files.
To keep up with posts on this blog, you can subscribe via RSS or follow me on DEV.