Code, Tutorials and Hacks
Notion is a useful tool for project management and note taking. Users can easily create new pages and databases for managing their projects. For example, you could create pages for email templates and then add a database for a mailing list. Why shouldn't you also be able to send an email with Notion?
In this post, you will learn how to use Notion to create email templates and an email mailing list. Using Python and SendGrid, you will make a console program, complete with argument parsing, so you can effectively send your emails.
To continue with this tutorial, you will need:
- Python 3.6 or higher installed on your machine.
- A SendGrid account. If you haven’t yet, sign up for a free SendGrid account.
- A Notion account. If you haven't yet, sign up for Notion for free.
- Two or more email addresses to test this project.
After you …
In recent years, Discord has become the central messaging platform for communities especially with the help of Discord bots. Through Discord’s extensive API, developers are able to build robust bots that are capable of various actions such as automating tasks and chatting with users.
With the gaining traction of Discord bots, I decided to think of ways that Twilio can be used alongside it. A fitting integration would be to use Twilio Programmable Messaging; you can communicate with those who don’t have Discord or SMS, or even be notified on important events such as if you’ve been mentioned or if members have left or joined your server.
In this article, you’ll learn how to build a Discord bot that’s able to notify you on important events on your server and allow you to send messages to your server all through SMS.
Here’s what you’ll need for this …
- A free Twilio account (sign up with Twilio using this link and get $10 in free credit when you upgrade your account)
- A Twilio Phone Number
- An AWS account
- An OS that supports .NET (Windows/macOS/Linux)
- .NET 6.0 SDK (newer and older versions may work too)
- A code editor or IDE (Recommended: Visual Studio Code with the C# plugin, Visual Studio, or JetBrains Rider)
- AWS CLI
What are webhooks?
In today’s API-driven world, integrating applications is easier than ever. Most of the time, y …
You can always count on the fact that I will get lost the first week of each college semester. I can have a physical copy of my schedule, my schedule set as my phone wallpaper, or a web page with my schedule pulled up. However, it can still take me a while to sift through webpages, find the building, search up the building, open up the directions, and then find the classroom.
With the new school semester coming around the corner, this problem came to mind during a coding workshop, and I programmed it in less than an hour. In this tutorial, you will learn how to use Twilio SMS, Python, and Airtable to send you an SMS message of your classes with directions for the day, so you can find your classes on time.
To continue with this tutorial, you will need:
- Python 3.6 or higher installed on …
Visual Studio recently introduced a new feature called port tunneling. By using port tunneling, Visual Studio will create a new public URL (tunnel URL) for you, and HTTP requests sent to the tunnel URL will be forwarded to your ASP.NET Core project running on localhost.
Port tunneling has a lot of use cases. You could use this to easily test your web application on other devices like mobiles phone and tablets. You could also use this to make your application temporarily, publicly available for doing interactive demos and inviting your audience to participate.
How to use port tunneling with Twilio
The most exciting use case for Twilio is that you can use port tunneling to test webhooks. What are webhooks again?
"Webhooks are user-defined HTTP callbacks. They are triggered by some event in a web application and can facilitate integrating different applications or third-party APIs, like Twilio." …
There I was, in a desolate cabin with nothing except my maladaptive daydreams, 2G coverage, and ingredients for the only dish I had ever managed to write down splayed out on the countertops. There was just one problem. After desperately rummaging through the rental’s kitchen cabinets, I found only a single tablespoon hanging lonesomely on an otherwise empty ring.
The proportions of ingredients were important in this dish, but I hadn’t actually sat down and memorized all the conversion rates before. Without internet service, not even Google could save me, but I did my best to eyeball it and make due.
It turned out terrible, and I vowed to never be in such a predicament again.
I've long been a fan of newsreader applications. Mostly for the convenience of being able to keep up with the stories, writers, and publications that interest me. That said, I'm also aware of the negative impact of such apps on my daily productivity.
The frequent interruption of my concentration by clickbait headlines is proving to be quite frustrating — especially as I fall for it every time. Yet, I'm somewhat hesitant to unsubscribe for the sake of FOMO (Fear of Missing Out).
For this millennial, the struggle is real. So, if you're like me and you share the dilemma of staying socially current while avoiding the trap of sensational headlines, you will find this tutorial incredibly helpful.
What will you build?
You will learn how to create a personalised news feed application that will text the day's headlines at the end of each day. The project will be powered …
Keeping personal information private is as important as ever, since information thievery and unwanted contact (content warning: harassment, sexual harassment) have become more common. When ordering food online, however, keeping your information private can be difficult.
For example, your driver may need to contact you regarding changes to your order or if they need help getting directions to your door. Instead of giving out your personal number to the delivery app, why not give a proxy number that can provide all that information instead?
In this tutorial, you’ll learn how to configure a proxy number that will provide delivery instructions with Twilio’s no-code solution, Twilio Studio! You’ll be serving up a menu that delivery drivers can interact with to get a gate code, directions to your place, and to call you (via a proxy number) in case there’s a change to your order.
For this tutorial, you will …
Because modern software is so complex it needs to use secrets and confidential information, such as API keys, tokens, and the older usernames and passwords for connecting to remote servers and databases.
While once it might have been seen as okay to store these alongside the code itself, these days — especially in light of the 12-factor app movement — that's no longer the case. It's considered bad security practice — with good reason — to keep any kind of secure information within your code.
Consequently, a range of approaches and tools have been developed to keep credentials out of code bases, keeping them secure and readily available to the code as and when required.
In this tutorial, you're going to learn how to manage Go application secrets with HashiCorp Vault.
If you're a PHP developer, check out the PHP version of this tutorial.
To follow along …
In this tutorial, you will learn how to make a one-time password (OTP) verification system in Django using Twilio. This application will allow users to select their preferred method of receiving the OTP.
Let’s talk about our main focus for this tutorial.
Our primary focus will be to make a pipeline of delivering OTPs and verifying them. That’s all we are going to do today.
What are we not going to do?
We will not make an entire Django user management and authentication system using the default Django login setup — we will be simply using cookies to see if the user is OTP verified or not.
Keeping these things in mind, let’s get started.