Writing
Rails Turbo Broadcast Update to Partial
How to send page updates with Hotwire using a specific partial.
From No-code to Code - How CommandWP Came To Be
Around 2014 I was doing a lot of consulting work. One client was creating WordPress sites and would contact me looking for help installing plugins or to fix a site that had been hacked with mal-ware.
They had a handful of sites they were working on and it was clear they had two common problems. No one was updating the code and there were no backups to be found!
Bet - PPC Campaign
Running a local PPC campaign will gain 2+ users. Assuming an LTV of $540/year, a $500 CPA, while high is a workable to optimize.
Bet - Locally focused site
Update site to a cleaner look and content focused on local hosting to Denver / Colorado will help increase conversions on the site.
Bet - Brick and Mortar
Brick and mortar stores will expose more people to Stubborn Goods. Test Sell one bag in 30 days through consignment in Abstract Denver stores. Cost Hang tags ($200). Commission on bags sold. Upside Sell more bags, brand awareness. Downsi...
Experiments are good, bets are better?
I think most people would agree the best way to learn is through experiments, some might say the "hard way", but I'm starting to believe it's actually the only way.
Experiments produce experience and that's where the value comes from. I've spent way too much time reading how to do something but I don't feel like I've actually learned how to do something until actually doing it.
Bet - Early adopter program
Early adopter program will validate the market for CommandWP.
Watch a process using Turbo streams
After upgrading to Hotwire, I wanted to try out Turbo Streams. In CloudSh there is a background job that runs a Golang application to index sites. That seemed like a cool thing to use Turbo Streams so I can see the console output.
Turbo Streams just work. The basic flow is capture the process output in the background job, broadcast it to the UI, and follow along by scolling as new data comes in.
Add Hotwire to an existing Rails app
Some quick notes on adding Hotwire to an existing Rails applicaiton.
How I handle web project hand offs
It's time to hand over a project. What do I provide when handing off a project? What do I expect to get when jumping into an existing project?
It's the same regardless of which side I'm on. Here's what I review and use to asses projects. I mainly deal with web applications, so I'm focusing on those.
Not everything here is necessarily part of the project requirements or agreement, but these are areas I look at to get a clear understanding of the state of the project.
Upgrading Rails Webpacker and TailwindCSS
In my continuing effort to consolidate technologies used in my projects I'm changing an existing Rails app to use Webpacker and TailwindCSS, and away from Bootstrap.
These are the steps I took to get TailwindCSSv2 working. Add webpack to Rails 5 covers the whole process, including moving existing JS and CSS files to Webpacker.
Hosting side projects - Dokku
Where should I host my side project? It's a question I ask every time I start a new project. I've tried so many different options I have to lookup where each project is hosted.
This is annoying and makes development slow. It takes time to remember where a project is hosted and then remember all the different options and commands for those environments.
New tools for the new year
Some new tools I've come across that I'm finding useful.
Ruby on Rails deployments to Elastic Beanstalk 2021
I've run a number of projects on Elastic Beanstalk, generally the whole experience is terrible. Still better than running servers yourself, but so far from Heroku.
All my projects end up with a bunch of .ebextensions
files that try to configure the EB server for the application.
They work sometimes, and almost alway break with platform upgrades, even minor upgrades.
Lucky Framework deployment with Apex Up
Hosting a [Lucky Framework] application on AWS Lambda using [Apex Up].
Build a Docker image like Heroku with Buildpacks.io
[Buildpacks.io] is bringing buildpacks, like Heroku uses, to anyone. Buildpacks are a better way to build [Docker] images, partly due to caching layers, but also helps build reusable build processes. This is a better intro Turn Your Code into Docker Images with Cloud Native Buildpacks.
CoC Solargraph Ruby Settings
Using [Coc] with [Neovim] in ZSH and a ruby version manager, like RVM, or [ASDF].
Rails Typed JSON Fields
I've been using Rails JSON Serialized Fields for
custom objects stored in Postgresql JSON fields. I found this approach and like it a lot more. It
uses ActiveModel::Type::Value
to create a custom type mapping for ActiveRecord.
Kickstarter by the Numbers
We decided to try Kickstarter for the first product of Stubborn Goods. We reached our goal thanks to our friends and family. This is an overview of what we did and some lessons we learned.
Why Kickstarter?
Stubborn Goods makes packs and bags. Since production requires a minimum quantity order to make sense we thought Kickstarter might be a good way to start.
Besides, I wanted to experience running a Kickstarter project.
Rails JSON Serialized Fields - Validations
Continuing from the earlier post Rails JSON Serialized Fields, this covers how to validate JSON serialized objects from the parent model.
Eleventy: Responsive Images
Route285 is a site of Colorado product companies. I have images of logos & products from those sites, but need to download and display them locally, in case an image changes later. Also, since eleventy-img supports resizing and different formats I wanted to get that stuff working too.
I ran into a couple of snags. First ICO isn't supported, that was pretty easy to work around, but I still wanted
a local version of the file. The useOriginalImage
function handles that. Plus it's helpful for errors and SVG files.
Also, since it's an addNunjucksAsyncShortcode
in 11ty, I needed to change my for
blocks to asyncEach
blocks. That took a while
to figure out as it just results in those templates returning nothing.
Using a bitmask for options in Rails
Sometimes I like storing a set of options for a model as in integer in the DB, but still want a nice interface to use those options in code. This is one approach I've been using.
Jupyter Labs and Ruby
Wanted to setup Jupyter for Ruby to test out some ML stuff. Here's the setup I used and some issues I ran into.
Devise JWT Authentication in Rails
Here's one approach to adding API authentication to a Rails application that's already setup with Devise and Cancancan. We'll add a Warden strategy to process a Token if it's passed in the request.
Wealth Creation Ladder
The ladders of wealth creation: a step-by-step road map to building wealth by Nathan Barry clicked with me. It provided a good framework to think about where I'm at and where I'm going. Thank you Nathan!
Below is a summary of points and where I'm at, my journey, and moving forward. Please read his article!