Code, Tutorials and Hacks
Have you ever had a video from a loved one that you wanted to keep forever? Maybe a picture that you wanted to save but didn’t want to add to your phone? Whatever the use case, it’s almost impossible to backup some types of media, like voicemail and contacts, without an app.
We're going to learn how to create a phone backup service that allows us to manually transfer data via WhatsApp to cloud storage, just by using our phone number.
In order to complete this tutorial you will need the following:
- Twilio Account
- DigitalOcean Account
- Local installation of Laravel
- Composer globally installed
- Ngrok installed
At the time of writing, DigitalOcean does not provide an official PHP API for connecting to its object storage. …
The SOLID design principles by Robert C. Martin, popularly known as Uncle Bob, are a set of principles that help a developer write clean, reusable, and maintainable code. The five principles that make up the acronym SOLID are:
- S - Single Responsibility Principle
- O - Open/Closed Principle
- L - Liskov Substitution Principle
- I - Interface Segregation Principle
- D - Dependency Inversion Principle
In this tutorial, we are going to look at the Open/Closed Principle. It states that entities should be open for extension but closed for modification. Essentially, it should be simple to change the behavior of a particular entity without modifying the original source code. New developers may find this principle confusing at first. It is the goal of this tutorial to help developers understand Object Oriented Programming by demonstrating the use of the Twilio SDK for PHP in a Laravel application.
NOTE: We are …
At my previous company, I was chatting with a coworker about getting more into open source. I told him I wanted to release an open source npm package. He suggested I try it with a custom React hook/effect I had written the month prior. It had the purpose of closing a dropdown menu or container when you clicked outside of it.
Together, we ambitiously tackled the goal and released a package called react-use-click-away 🎉 It isn’t a perfect package but it gave us that experience we were longing for.
While figuring out how to do all this, I realized it felt more intimidating than it should have. To solve that, I’m going to show you all the things you need to know in order to release your own custom React component, hook or effect as an npm package 😎 Let’s do it!
Things You Should Know
Before we jump in, …
Now that we have created a simple CRUD API, let's learn how to retrieve the data we want using query parameters, customize the pagination of the results, then create custom controllers and endpoints.
NOTE: This tutorial is Part 2 of a 2-part series. If you haven't completed Part 1, it is available here.
Adding Custom Operations to Your Endpoints
API platform automatically creates CRUD operations when the resource is created. Custom operations can be assigned to specific routes if an operation is specified. There are two types of operations for collections and items. Collection operations are operations that act on a group of resources such as retrieving all bucket lists. Item operations are operations that act on a single resource such as retrieving one bucket list. For collection operations, the
POST routes are implemented with the
GET operation being enabled by default. In item operations, the …
The Web Speech API has two functions, speech synthesis, otherwise known as text to speech, and speech recognition. With the
SpeechSynthesis API we can command the browser to read out any text in a number of different voices.
From a vocal alerts in an application to bringing an Autopilot powered chatbot to life on your website, the Web Speech API has a lot of potential for web interfaces. Follow on to find out how to get your web application speaking back to you.
What you'll need
If you want to build this application as we learn about the
SpeechSynthesis API then you'll need a couple of things:
- A modern browser (the API is supported across the majority of desktop and mobile browsers)
- A text editor
Do you want a cookie?
Almost everyone in the world likes cookies. It’s hard not to like cookies when grandmas, commercials, and bright-eyed Girl Scouts make them impossible to avoid. Those addictive, sweet, circles of joy are so ingrained into our everyday lives that even our dogs and kids don’t stand a chance at avoiding these fine treats.
It would only make sense that something so delicious would eventually permeate non-food categories. In the mid-1990s, cookies continued their conquest and found their way into technology.
During early web browser development, a founding engineer of Netscape Communications decided that the protocol that best-implemented state management should be called “cookies”. Lou Montulli believed that fortune cookies best defined these bits of information delivered in small packets.
For the past 25 years, cookies have taken the lead in managing state within web applications. However, microservices such as Twilio Sync offer an additional option …
Regulatory compliance (RC) requirements for phone number users have increased worldwide. Depending on the phone number and its features, your or your company's status in the country, and your intentions for the number, different laws and regulations apply while building Voice, Fax, or SMS-based applications.
While some of these regulations are new, many of these laws and rules have been in effect for some time. Countries are increasing enforcement for many reasons – including fraud, incidents of misuse and abuse and heightened national security concerns.
All your Twilio phone numbers on Twilio’s platform need to comply with individual country requirements or they are at risk of being suspended until you submit proper RC information.
Read on for what you need to know to bring an existing communications application into compliance or before starting a new application.
Here's a video overview explaining what's happening:
You can find the regulatory …
There's a lot of conflicting information on best practices when building bots, so we set out to make your chatbot-building life easier in our new comprehensive guide to Intelligent Chatbots.
That massive resource provides developers, builders, and DOers with an intelligent bot guide, covering bot use cases, descriptions of how bots work, instructions on building and deploying bots, intelligent bot best practices, and more.
In this post, I’ll summarize some of that guide and tell you what you need to consider to build better bots.
1. Pick your use case and type of chatbots
The purpose of most bots is often to automate tasks, save time, or just to generally make life easier – just like with most other tools and automation. So first, you’ll need to consider your bot’s use case.
Various industries use chatbots in different ways. Here’s a list …
As developers, we mostly focus on building applications. However, building the app is only half the story. To consider things “done,” we need to get that app deployed into the wild where people can use it. In the .NET world, there’s no shortage of ways we can host our apps, but today, I’d like to focus on building cloud native .NET applications.
In this post, you’ll learn about building cloud native applications in ASP.NET Core. You’ll learn how to design for the cloud, spin up an Azure Kubernetes Service instance, and deploy your application into the cloud. By the end of this post, you’ll have the tools to build and deploy your own cloud native ASP.NET applications.
What do you mean by “cloud native”?
“Cloud native” is one of those terms that sounds obvious, but there’s a more specific definition.
The Cloud Native Computing Foundation defines the term as follows: …
Ever had one of those mornings when you woke up unmotivated, but read a quote and the energy returned? That is the power of positive and motivational quotes.
Motivational quotes have a way of making people feel inspired and energized. This phenomenon can be attributed to a combination of factors such as motivational psychology, wordsmithing, and self-selection.
In this tutorial, I am going to teach you how to create an app that automatically sends you motivational quotes every morning. Before we start, here is a motivational quote to uplift you as you follow along.
“Believe in yourself! Have faith in your abilities! Without humble but reasonable confidence in your own powers, you cannot be successful or happy.” – Norman Vincent Peale
To complete this tutorial, you will need the following: