Owen Conti

Cloudflare

How to add Cloudflare Durable Objects to an environment

under Cloudflare

By default, Cloudflare's Durable Objects are not inherited across environments, here's how you can fix it.

CSS

Supporting Dark Mode with SVG Favicons

under CSS

SVG favicons allow you to invert your favicon's color scheme for users that are using dark mode.

Devops

How To Fix Query Execution Was Interrupted With AWS RDS

under Devops

"Query execution was interrupted" can sometimes be solved by increasing the storage size of your database.

How To Copy Heroku Postgres Database Across Environments

under Devops

Here's a one line command you can use to copy a Heroku Postgres database backup to a database in another environment.

Copying Heroku Environment Variables Across Projects

under Devops

Here's two quick commands you can use to copy Heroku environment variables across projects using the Heroku CLI.

Create a Reverse Proxy with Cloudflare Workers

under Devops

Here's a quick copy/paste snippet you can use to create a reverse proxy server in Cloudflare.

Force PHP version during GitHub Actions job

under Devops

GitHub has a set of pre-installed packages with the default containers it provides. Learn how you can override the default PHP version.

My Experience with Netlify Dev After a Couple of Hours of Using It

under Devops

Here's my review of Netlify Dev after a few hours of using it.

Laravel

Moving on From CRUD

under Laravel

CRUD-based naming for web applications works, but there's a better way using Single Action Controllers and VerbSubjectType naming patterns.

Caching Laravel HTML With Cloudflare

under Laravel

Laravel's default setup prevents Cloudflare from caching HTML responses.

Logging Messages to Slack Channels with Laravel

under Laravel

Laravel's logging system makes it very easy to system notifications to your company's Slack channel.

Temporary Relationship Trait for Laravel

under Laravel

Here's a small trait you can use to access "temporary" relationships in Laravel.

"Where Has All" Functionality in Laravel

under Laravel

Laravel doesn't have a whereHasAll method built in, but here's how you can replicate it yourself.

Failing to start MySQL inside GitHub Actions

under Laravel

If you've recently started running into an issue with MySQL on GitHub Actions, you may need to update your MYSQL_USER variable.

Replacing Laravel Mix with Vite

under Laravel

In this guide, we'll replace Laravel Mix with Vite in a Laravel Jetstream (Inertia/Vue) application.

GitHub Action to Deploy Laravel Vapor Apps

under Laravel

Here's a GitHub Actions file you can use to deploy Laravel applications to Laravel Vapor.

Adding Stripe Checkout and Customer Portal to your Laravel application

under Laravel

Learn how to add Stripe's Checkout and Customer Portal products to your Laravel application using Laravel Cashier.

Storing and testing encrypted values in Laravel

under Laravel

A couple of open source packages makes storing and testing encrypted database values in Laravel a breeze.

How to fix "cannot declare class because the name is already in use" error in Laravel/PHP

under Laravel

This error can happen when you have two of the same class names declared in the same namespace.

Building a Search Drop Down Component with Laravel Livewire

under Laravel

Follow along as we build a drop down component with Caleb Porzio's Laravel Livewire.

Connecting to ElastiCache with Laravel when using Encryption In-Transit

under Laravel

If you're using ElastiCache with the Encryption In-Transit setting turned on, you'll need to tweak your REDIS_HOST environment variable when connecting with Laravel

Improve the Performance of Laravel Feature Tests using MySQL Instead of SQLite or Memory Databases

under Laravel

Many people use an in-memory SQLite database when running their Laravel feature tests. If you're doing this, chances are you can improve the runtime of your Laravel test suite.

Calling Laravel Seeders from Migrations

under Laravel

Calling seeders from migrations allows you to ensure data referenced by code always exists in your database.

Faking the Queue in Laravel Tests

under Laravel

Here's a quick package you can use to fake the Queue for a specific set of lines in a Laravel test.

Laravel Dusk Error: "Chrome version must be between 70 and 73"

under Laravel

When using Laravel Dusk, you have to ensure you're using the correct Chrome Driver version based on the version of Chrome installed on the machine.

Setting Up PHP CodeSniffer for a Laravel Application

under Laravel

Here's how you can quickly get started with linting your PHP code using the CodeSniffer library.

GitHub Actions Workflow File for a Laravel Application

under Laravel

The following workflow script can be used as a starting point for building and testing a Laravel application with GitHub Actions.

Signing AWS CloudFront Requests with Laravel

under Laravel

If you upload files to AWS S3 via your Laravel application, but want to restrict access to those files, you can do so using signed requests.

How to Handle Multiple Events with a Single Listener in Laravel

under Laravel

Laravel provides a simple way to declare event listeners out of the box via the EventServiceProvider class.

Laravel Request Logger Snippet

under Laravel

Here's a quick snippet to get HTTP request logging setup quickly in Laravel.

Improving the Performance of your Laravel Queue

under Laravel

Learn how to fix a potential performance problem when serializing models for Laravel jobs.

Laravel Forge Fails to Provision Servers on AWS

under Laravel

There's a common problem when using Laravel Forge to provision servers on AWS.

MySQL

MySQL General Log

under MySQL

Let's run through how you can setup and configure the MySQL general log.

PHP

How to Fix PHPUnit Splitting Dots onto New Lines

under PHP

Quick tip on how you can fix PHPUnit from splitting test output onto new lines.

Using Aliases in Composer to Update Dependencies without a Fork

under PHP

One of the major pain points of updating dependencies is the strict version requirements developers place on their packages.

React

Why You Should be Using React Context More Often

under React

React Context can be more than just global state in an app. I like to think of Context as "encapsulated state".

React Error Boundaries

under React

React error boundaries allow you to prevent your React application from completely crashing in the event of an error in your code.

How to Fix "cannot update unmounted component" Warning with React Hooks

under React

Learn how to properly unmount React components when using React Hooks.

"Nothing was returned from render." ReactJS Error

under React

Let's take a look at how you can fix this common error in React.

"Rendered fewer hooks than expected." ReactJS error

under React

Learn how to fix the "Rendered fewer hooks than expected." error with React Hooks.

"Hooks can only be called inside the body of a function component" ReactJS Error

under React

Let's review the rules of React Hooks, and how you can fix the "Hooks can only be called inside the body of a function component." error.

Statamic

Using GitHub's Gists for embedded code blocks on your Statamic v3 site

under Statamic

You can use GitHub's Gists to embed your code blocks via the Oh See Gists add-on.

Setting Up Dynamic HTTP Redirects with Statamic v3

under Statamic

You can use Statamic's redirect tag plus a custom blueprint to setup dynamic HTTP redirects on your Statamic website.

Using Static HTTP Redirects in Statamic v3

under Statamic

Statamic includes a built-in mechanism for setting up 301 and 302 HTTP redirects.

Escaping Antlers Output in Statamic via the `noparse` Tag

under Statamic

By default, when you output content from a field into a template, Statamic will attempt to run that content through the Antlers templating language.

Deploying a Statamic Site to Netlify Using the Static Site Generator

under Statamic

With Statamic v3, you can generate static sites which means you can deploy to services such as Netlify, AWS S3, Now, etc.

TailwindCSS

Using CSS Transforms with TailwindCSS v1.2

under TailwindCSS

You can now use CSS transforms right out of the box with TailwindCSS v1.2.

Building CSS Grids in TailwindCSS v1.2

under TailwindCSS

Support for CSS grids has been added to Tailwind v1.2..

Using CSS Transitions with TailwindCSS v1.2

under TailwindCSS

TailwindCSS 1.2 adds the ability to apply CSS transitions right out of the box!

Thoughts

Goals for 2021

under Thoughts

Taking a new approach to goal setting in 2021 by making my goals public, high level, and planned out.

There's No Such Thing as "Weird" in Programming

under Thoughts

Here's one of the first tips I'd give to beginner programmers.

Tips

Productive Alfred workflows for developers

under Tips

I've recently started using Alfred again as my global command palette on my machine. In this article, I'll go over a list of some of the workflows I use on a daily basis, and how they work.

How I use Calenderio to block time and reconcile my calendars

under Tips

Calenderio saves me time every day by automatically syncing my events and reconciling my calendars for me.

5 Keyboard Shortcuts to Navigate Your Code Faster

under Tips

Here are 5 keyboard shortcuts you can implement in any IDE to help navigate your code faster.

TypeScript

Fixing Duplicate ID Errors with typeorm-factory

under TypeScript

You need to pay close attention when creating factories with typeorm-factory.

Vue

How to use Persistent Layouts with Inertia and Vue 3 Setup Script Syntax

under Vue

Here's a quick way you can support persistent layouts with Vue 3's setup script syntax.

How to Forward Refs with Vue 3 and <script setup>

under Vue

Forwarding refs when using <script setup> in Vue 3 is a bit tricky due to some magic happening behind the scenes

Validating Props in Vue

under Vue

Use Vue's built-in prop validators to validate your component's props.