Keep Syntax Highlighting with Diffs in Rouge
Learn how to maintain proper syntax highlighting while using diffs in Rouge.
Trix and I are not friends
A small summary of some of the issues I've run into using Trix.
Run A Vim Macro On Every File
Run A Vim Macro On Every File
Listening for Changes To An Element Property
Listening for Changes To An Element Property
Web Components Tailwind And SSR
Web Components, Tailwind, And SSR
Adding Access-Control-Allow-Origin Header to Bridgetown
A brief guide to adding the Access-Control-Allow-Origin header to Bridgetown
The Shoelace Side Effect Scavenger Hunt
Come along and join me on my journey to debugging side effects and treeshaking in Shoelace and figure out why everything is broken!
Wrapping Lit React Wrappers
In this post we'll walk through how you can take a Web Component, wrap it with @lit-labs/react, and wrap it again to provide your own lifecycle hooks.
Stubbing the Custom Elements Registry
In this post we'll walk through how we can stub the custom elements registry to do things like enable multiple registration using things like Proxies and Sinon.
What is Declarative Shadow DOM?
A cursory glance at Declarative Shadow DOM (DSD) and why it matters.
Inserting a string on the first line of every file with Vim
Alright here it goes, I needed to add a header to all files. There are roughly ~72 files and I didn't...
Maintain scroll position in Turbo without data-turbo-permanent
Alright, this will be short and sweet for future me. Maintaining scroll position is notoriously...
button_to vs link_to and the pitfalls of data-turbo-method
If you're familiar with Turbo, or even HTMX You'll see this pattern come up frequently...
Rails Frontend Bundling - Which one should I choose?
Propshaft? Or Sprockets? If you use the following options:...
Revisiting box-sizing best practices
We've all googled "best way to set box-sizing: border-box;" and come across this fun article from CSS...
How to keep a persistent class on a LitElement
When working with lit, sometimes you want the host element to have a persistent class name. A good...
Jest, Vitest, and WebComponents
Purpose Jest and the newer Vitest are inextricably linked with frontend testing tools....
ActionText: All the ways to render an ActionText Attachment
There's so many ways to render an ActionText attachment, we can change the...
ActionText: Safe listing attributes and tags
To safelist tags and attributes in ActionText we need to inspect the source since I was unable to...
ActionText: Modify the rendering of ActiveStorage attachments
If you have not already, make sure to run both the ActiveStorage and ActionText installers...
Why we still bundle with HTTP/2 in 2022
HTTP/2 is out! CDNs are hot! Perhaps you've heard of HTTP/2 and its Asset Multiplexing and the...
Testing scopes with Rails
The Problem A common problem I've seen and that took me a long time to understand was how...
Adding additional actions to Trix
It's not documented how to add additional "actions" to Trix. Current actions can be found...
Converting a callback to a promise
Sometimes you want your synchronous function to run asynchronously. Perhaps you want to run multiple...
Escaping the traditional Rails form
Theres been a pattern I've seen creeping in Rails apps. The pattern is that there are cases where...
Adding text alignment to Trix
A user had asked in Discord "Is there a way to add text alignment to Trix" I thought this was a...
Modifying the default toolbar in Trix
The first thing you may be tempted to do when exploring with Trix is to change the default toolbar....
Why? Well, the reason is simple. Trix is notoriously hard to extend. It has little...
Cross-browser Vertical Slider using input type="range"
Vertical Sliders Vertical sliders have been around in the form of <input...
Rebuilding ActiveStorage: First Impressions
Why? ActiveStorage's JS library is just fine...why rebuild it? You're not wrong. It...
Why Jest is not for me
Why make this at all? I don't enjoy bashing other people's hard work. This isn't meant...
Frontend Bundler Braindump
What is this? The following is a collection of terminology and definitions of various...
Writing code block highlighting to a CSS file with Rouge.
Purpose To remind myself how to do this again in the future. How to do it? To...
Creating reusable flashes in Rails using Shoelace
Purpose To document how I made a reusable flash system leveraging Shoelace + Rails ...
Pulling down somebody's fork with Git.
Purpose To provide an easy to use way to pull down somebodys fork on your project. ...
The purpose of this is to remind myself what to do next time I encounter this...
Migrating HLS videos to Mp4 format in Rails.
Purpose Recently, I was tasked with migrating our HLS videos over to mp4 format and store...
Querying ActiveStorage Attachments
You want to find all the ActiveRecord models that either do / do not have a..."
Case / Switch Statement in Ruby
Why is this here? I always forget how to write case statements and always find myself look...
Notes from RailsConf 2014 Link to talk: https://www.youtube.com/watch?v=ShPAxNcLm3o...
PNG optimization from the command line
Optimize your pngs from the command line using pngquant and bash
How do default_url_options work in Rails?
A quick down and dirty guide to the totally bizarre default_url_options API in Rails.
Common pitfalls and issues with Rails timezones. Differences between the browser and the server, and various other tidbits.
Active Storage Variants with Rails 6.1
receiving the following error with ActiveStorage Variants with Rails 6.1? ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: null value in column 'record_id' of relation 'active_storage_attachments' violates not-null constraint) Let me help!
Webpack, Rollup, Parcel, Snowpack, and beyond
A brief comparison between popular frontend bundlers. I will walk through my thoughts and feelings related to each bundler
Dynamic Getters and Setters on an Object
A guide to defining dynamic getters and setters on a Ruby Object
Getting started building with Bridgetown by dockerizing it. I'll walk through a Docker setup for Bridgetown using Alpine Linux.
Getting Started with Rails 6
A guide to getting setup with Rails 6 using Docker
Adding Emotion, Typescript, and Jest to Gatsby
A detailed description of adding emotion, typescript, jest, and react-testing-library.
Adding tailwindcss to a Gatsby project
Details on how to add tailwindcss to a Gatsby project.
Setting up a Gatsby project with Docker
How to setup a new gatsby project with docker within the current directory of your project
Making EMS Helper - Hiccups
Detailing a few of the issues faced when attempting to populate the database.
Making EMS Helper - Setting up
Detailing the initial setup of EMS Helper with Rails 6, Webpack, TailwindCSS, Docker, and Docker-Compose
Making EMS Helper - Introduction
This is the beginning of EMS Helper. A service meant to provide people with the ability to quickly locate the closest appropriate hospital.
PostgresQL - Setting up postgres on a local environment
I will detail a short and easy way to get PostgresQL running on a Ubuntu based machine for local development.
PHP for Beginners - Part 8 - What the heck is PDO?
Lets learn about PDO and why its important.
How to setup TailwindCSS with PostCSS and Webpack
I will detail how to setup TailwindCSS with PostCSS and Webpack. I will do the bare minimum setup to get it working without many plugins.
JS - How to configure webpack-dev-server live-reloading
In this post, I will go over how to configure webpack and webpack-dev-server to allow for live-reloading similar to live-server
JS - Using Jest with Import and Export statements
Using jest with import and export statements is not easy. I will detail how to use the ES6 based syntax in the following post.
JS - Appending multiple children to an element
After searching and scouring the internet for the best way to append multiple children within the DOM at the same time, I came across the DocumentFragment API
JS - Introduction
A basic introduction as to what this series will be about
PHP for beginners - Part 7 - Classes?...Like school?
Lets look into classes in PHP. Classes are the building blocks of Object Oriented Programming
Learning PHP - Part 6 - MySQL? Or Your SQL?
Lets learn some basics of SQL based databases, in this case, MySQL
Learning PHP - Part 5 - Lets make it functional
Lets learn a little bit about functions
Learning PHP - Part 4 - Lets get conditional
Dealing with conditionals and booleans
Learning PHP - Part 3 - Arrays, Arrays, and more Arrays
Lets dive deep into arrays and associative arrays
Learning PHP - Part 2 - Lets get coding!
Learn php with me! Part 2
Learning PHP - Part 1 - Lets Compile PHP!
Compiling PHP with PHPENV is not easy, come enjoy my frustrations in this task.