Eleventy: Responsive Images

| 11ty, eleventy, netlify, github, route285

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.

Jupyter Labs and Ruby

| asdf, bundler, jupyter, 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.

Eleventy Webmentions

| eleventy, 11ty, webmentions, bridgy, microformats

Owning my content and making it easy to post are both important to me and I've been slowly working to do that more. Moving my blog to 11ty was a big step in that direction. Now with webmentions and bridgy it's easier to share content. This post talks about what I've setup to connect my blog to the indieweb and some of the closed networks.

Rails 6 and multiple uploads

| rails, rails6, stimulus

[Active Storage] is awesome for uploading images, but handling has_many_attached needs some additional stuff if you want be able to add and remove specific images.

This is how I setup multiple uploads so files can be added and deleted without re-uploading the files.

Rails 6 Inky Emails

| rails, rails6, email, inky, foundation emails

Making emails look nice is a huge pain! [Foundation Emails] help by giving you short HTML tags that are expanded into HTML for emails and nice classes for styling.

Getting early adopters for CommandWP

| pricing, saas, commandwp

[CommandWP] is getting to a point where I'd like to get some early adopters using it. I'm not sure what a good approach might be. Here's what I'm thinking about.

Add Webpack to Rails 5

| rails, rails5, webpack, webpacker, scss, bootstrap, font-awesome

The push to use webpack with rails is getting too much to resist!

You can setup some good stuff with sprockets, but it's a pain and a lot of it doesn't seem too updated.

So... to get things like good ES6 support, minification, easier script managment with Yarn, and PostCSS support; It's time for webpacker

Webdev like it's 1997

| webdev

When I started learning to create webpages the web was fun and crazy and annoying. It was also open and easy to get started.

There are a few trends that are bringing some of that web back. I'm loving it!

To Freemium or Not Freemium?

| saas, cloudsh

I usually don't write about the side projects I'm working on. In the spirit of changing that, I'm going write about my thoughts for CloudSh & the Freemium model.

CloudSh is a SAAS service providing search for static sites, or any site really, as long as the content is public.

I initially planned on having an free level, then changed my mind, then changed it again! WTF?! It's hard working in a vacuum!

Rails JSON Serialized Fields

| rails, rails5, simple_form, factory_bot

Using Rails 5 to serialize objects into a JSON field in the DB. We're gonna assume we want to store some options as a JSON field on a User model. And we want an Options model to work with in code.

JS Widgets

| javascript, webpack4

Basic Webpack setup for creating a JS widget w/ a loading script.

Elixir Deploys with Make

| elixir, make

This is one of the first times I've used make, but I regret not using it more often. It's pretty simple to get started and really powerful. This was a mix of a lot of different resources.

Elixir and Docker

| elixir, distillery, docker

Elixir releases need to be built on the same system as they run on. Seems like Docker is perfect for building the releases and running them.

Well, it's prefect for building the release. Running in Docker can make some of the BEAM stuff harder, like live code updates and clustering. Looks like there are some solutions for both, but for now I don't mind just restarting the Docker containers.

Building Releases with Distillery

| elixir, distillery

Seems like just running the app with mix is probably fine for now, but will make using a lot of the BEAM hard/impossible later. Also, the project has multiple apps, so making different builds for each seems like it might be a good idea.

Beanstalk with Terraform

| elixir, terraform, beanstalk

This took the longest time to get working. Partly because of my own typos :p. But, also because I wanted to setup everything with Terraform.

The Beanstalk stack is just the basic Docker stack. I setup RDS for the database because both apps need it.

Deploying an Elixir Umbrella Application

| elixir, docker, distillery, terraform, make, beanstalk

The plan; use Distillery to build the Elixir apps in a Docker container. Then create Docker containers with the compiled apps. Use those to deploy on AWS Beanstalk. Build the AWS Beanstalk setup with Terraform. And deploy through a Makefile to automate things.

It's a lot of setup to deploy an app!

Elixir Phoenix Partials

| elixir, phoenix

How to create partials in Elixir with block like syntax. Like:

= render_shared "page_header.html", title: "Listing Posts", body: fn ->
  = link "New Post", class: 'btn btn-sm btn-outline-secondary', to: post_path(@conn, :new)