
I smash my fingers on the keyboard and occasionally stuff happens.
Fixing [SceneConfiguration] Info.plist contained no UIScene configuration dictionary error in Xcode
It seems Xcode 14.2 introduced an annoying little error when running your app in the Simulator. The error reads:...
Customize your Mastodon Handle
Let’s say some narcissistic moron buys the social media company you use daily and decides that it would be better off with 100x the Nazis. You decide this isn’t for you, so you find yourself exploring the world of Mastodon...I'm leaving Twitter
I joined Twitter in December 2008. I was at the beginning of my career and eager to see what the web design and development field was up to. I enjoyed the platform’s brevity and the immediate consumption of information it allowed...Day of the Dead
We recently took a trip to Puerto Vallarta, Jalisco, to witness the Day of the Dead celebrations. It shares similar timing with Halloween and folks down there celebrate both. There were many trick-or-treaters out and about, but the main attractions were the Catrinas, and folks down there celebrate both...Using PurgeCSS with Rails
We leverage CSS frameworks like Bootstrap or Tailwind in our applications, but we likely won't use *all* elements from the framework. This means that we’re serving larger CSS files than we need to. Wouldn’t it be great if there was a way only to include the...How to minify and add vendor prefixes in Rails 7
If you fire up a new Rails 7 project, you’ll probably be missing a couple of tools you should have: minification and vendor prefixing. Minification takes our JavaScript and CSS assets and squishes everything down by removing whitespace to make file sizes smaller. Adding vendor prefixes helps normalize the way our...
Fixing page jump in Rails websites using Turbo
This was a very annoying problem that had a straightforward fix but was hard to track down.
You have a Rails website using Hotwire/Turbo that is, after clicking a link, skipping to the top before navigating to the requested page. The steps needed to replicate are:
- Scroll to the bottom of the...
Regex match for spaces outside of HTML tags
Let’s say you are truncating a blog post to produce an excerpt for multiple posts in an index view. In Ruby on Rails, we can use the truncate()
method like:
You might already notice a pitfall with this implementation. By setting escape
to false
, we are allowing HTML...
How to prepare Rails assets before running tests
I’m currently building a Rails 7 app that was started with rails new myapp --css=bootstrap
. This means Rails set up my app to use esbuild to compile all my CSS and JavaScript assets. This new --css
flag provided by Rails is a fantastic improvement over previous implementations like...