Posts By: Ken Collins

Trigger CircleCI Workflow. AKA Simple Deploy Button

Very simple, no parameters needed, no enums, no booleans... just a really easy way to trigger a deploy with CircleCI. We can do this making use of the trigger_source pipeline value. When you click the button in CircleCI to "Trigger Pipeline" the value would be api vs something like webhook.

Read More

New Amazon Linux Dev Container Features

🆕 Want to use Codespaces with Amazon Linux 2? Check out customink/codespaces-features for two custom features. 1) common-amzn 2) docker-in-docker-amzn.

Read More

Monolithic Ideas For AWS Lambda File Systems

With Rails & Lamby Today I am excited to share the release of AWS Lambda File Systems. A simple, scalable, fully managed network file system leveraging Amazon's Elastic File System (EFS) technology. And what better way to celebrate the accomplishments of our hard-working AWS friends than by building clever uses of their tools in ways they may not have intended... or outright feared 😱

Read More

AWS CLI Multi Factor Auth (MFA) with Docker

Recently I blogged about using SAM Cookicutter Projects to kickstart your development. One aspect of that work was leveraging Docker containers for all the SAM CLI commands. However, sometimes we all have AWS CLI tasks that fall outside a project. At Custom Ink we make heavy usage of Homebrew and projects like pyenv, a Python Version Manager, to install both system and project-scoped tooling. Neither of which help me maintain a sane global AWS CLI setup. Especially when multi factor...

Read More

Using AWS SAM Cookiecutter Project Templates

To Kickstart Your Lambda Projects For the upcoming Lamby work, we really want to improve our "getting started" experience. Creating a new Rails app on AWS Lambda should feel just as natural as running the $ rails new command line tool. One option to explore could be AWS' Serverless Application Repository. Commonly called SAR (czar, not es•ay•are) for short, it offers re-usable applications similiar to Heroku's deploy button.

Read More

Migrate Your Rails App from Heroku to AWS Lambda

Using The New ActiveRecord Aurora Serverless Adapter Need a More Robust Rails on Lambda Database Solution? AWS announced that RDS Proxy is Generally Available. Our Lamby guides now have detailed steps to deploy your first RDS Proxy with Rails using native MySQL connnections with our very own statically built gem for Amazon Linux 1 & 2. Are you someone with a pet Rails project running on a Free, Hobby, or Professional Heroku plan? Perhaps your company or freelance gig has...

Read More

Building a CloudFront Cookie Dashboard

Using AWS Lambda@Edge, Kinesis, & QuickSight. Every large consumer-facing #rails app I have worked on has on and off again spikes of cookie overflow issues. It is made infinitely more complex with multiple front end apps. I will be digging into this more over the next couple days.— Dan Mayer (@danmayer) August 13, 2019

Read More

From TravisCI to GitHub Actions

If premature optimization is the root of all evil, should procrastination until the right tool arrives be divine? If so, then yours truly would be the Patron saint of pragmatic & lazy programmers everywhere. I'm no adoption curve laggard, rather more like an early majority adopter with an extended view of the x-axis 😅 and I'm here to convince you that now is the right time to reevaluate your CI/CD needs.

Read More

Secure Configs with AWS SSM Parameter Store and Rails on Lambda

Part of an series while developing, Lamby - Simple Rails & AWS Lambda Integration using Rack 🚂🐑. Most Rails applications require over a dozen environment variables to configure themselves or use popular gems. Most notable is the DATABASE_URL or others like SECRET_KEY_BASE which is used by Rails itself to sign encrypted cookies for sessions.

Read More

Rails on AWS Lambda with SAM

Move over basic "Hello World" functions - get ready to super charge your next Lambda project with the most productive web framework on the most convenient cloud infrastructure! Following up from my Arlington Ruby presentation AWS Lambda & Ruby/Rails with SAM last week - I am very excited to share today how you can get started with Rails under AWS Lambda.

Read More

Using IMGIX to Personalize Knolled Images

Deconstructed: Photo by Todd McLellan. Knolling is the process of arranging different objects so that they are at 90 degree angles from each other. The term originates from a janitor named Andrew Kromelow in 1987 who would arrange tools using this method for a popular furniture brand called Knoll. Commonly photographed from above, knolling is a highly popular method for promoting products from companies like Instagram to Apple.

Read More

Power Moves: SQL Server on Linux, Rails, and Docker

Microsoft is releasing new versions of SQL Server on Linux more and more frequently. Last month brought us SQL Server 2017 Community Technology Preview 2.0 and like the others before, it's a breeze to use with Docker.

Read More

Making Static Components Stateful With CSS/Sass

Searching for some red ladies hoodies to wear at your team's event this Fall? How about a purple heathered t-shirt for your group's outing? Last month we launched an exciting change to our product catalog – the ability to filter styles whose color(s) match a simplified name or filter. Finding your customizable apparel in the right color is now easier than ever. And thanks to our usage of SUIT-based CSS components, along with the ability to leverage existing Rails' fragment...

Read More

Rolling Builds on TravisCI

Work on the Ruby SQL Server stack often requires long build times. Dependencies need to be downloaded, native extensions built, followed by long test runs to remote services. One feature I have come to rely on with Appveyor are their rolling builds - where commits to the same branch cancel previous running builds. Though Appveyor is great for Windows builds, my 💖 belongs to TravisCI. They are my goto for continuous integration due to their GitHub integration and open source...

Read More

Microsoft's First Open Source DataCamp

Rarely do the words "open source" come to mind when the Microsoft Corporation is mentioned. As the maintainer of the SQL Server stack for both Ruby & Rails, and a long time Apple/UNIX fan, I have been engineering solutions to make working with SQL Server as easy as possible. Often times the work has required outside in hacks to a closed & proprietary set of technologies. That changed last week.

Read More

Colorized SQL Log Backport for ActiveRecord

One of the new features of Rails 5 will be granular SQL logging so you can easily see SELECT, INSERT, UPDATE, DELETE, and TRANSACTION statements in your log. For example: But why let Rails 5 have all the fun? Today I created a gem that allows you to leverage this feature now. The gem is currently compatible and tested for Rails 3.2 to 4.2. Get it here and happy logging!

Read More

Rails Multi-Database Best Practices Roundup

Seamless second database integration for Rails. 2016-01-11: We just finished a new version of SecondBase, our own gem that provides support for Rails to manage dual databases by extending ActiveRecord tasks that create, migrate, and test your application. It supports Rails 4.x and up. Check it out on GitHub. Since landing my first job programming with Ruby, most Rails applications I have worked with have managed two or more database connections. Often times these connections are both readable and writable....

Read More

Customizing Rake Tasks In Rails 4.1 And Higher

I have been overriding, invoking, and executing custom Rake tasks since I was an early Ruby developer. Tweaking your project's automated tasks are likely the closest thing Rails developers come to building their own light saber. Most popular are adding or changing how the Rails test suite behaves. For example, adding Capybara to your project. Recently I have been upgrading projects from 3.2 to 4.2 and one thing that really stood out to me was how Rails testing tasks are...

Read More

ActiveRecord 4.2's Type Casting

Last month Rails 4.2 was released and if you have been keeping up with my posts, I even covered how you can upgrade from 3.2 to 4.2 in one step! This speaks volumes to how easy it is to adopt to outward facing API changes within our beloved framework. But often times, version changes bring implementation changes that we never see. For example, all of Aaron Patterson's work for AdequateRecord Pro™ are performance optimizations that affect no outward API interface...

Read More

Unit Testing Sass Frameworks

Building the living style guide for CustomInk's new mobile/responsive sites required that we stand on the shoulders of other great frameworks. All of them well authored and hence well tested. But as we built more tools on top of these giants, we felt the need to test our own framework's code and thus began the search for Sass/CSS testing methods. After surveying the current state of testing, I found myself let down. To be fair, there are some really clever...

Read More

From Rails 3.2 to 4.2

Last week I set out to upgrade HomeMarks, a personal bookmarking project of mine. This application sat on a very recent upgrade to Rails 3.2. It is written as an API to both an iOS and HTML JavaScript interface. It is by no means huge and should represent a nominal service oriented application. Here are some stats: 8 Models (450 LOC) 11 Controllers (550 LOC) 2 Mailers (50 LOC) 8 Libraries (500 LOC) Using Ruby 2.1.2. The application is heavily...

Read More

Dynamic SVGs Using <defs> Elements & JavaScript

The scalable vector graphics format has a really nifty way to define and reuse objects. It does this by allowing objects or paths to be defined in the <defs> element and then used one or many times with the <use> element. It is a great way to keep your SVG's file size low. Even better, it makes for a great programmatic interface to dynamically compose an image. While designing the third iteration of my personal MetaSkills.net blog, I decided to...

Read More

Instrumenting Your Code With ActiveSupport Notifications

Have you ever wondered how tools like New Relic are able to gain valuable metrics to your Rails application's internals? Or maybe you are interested in learning how to write your own libraries and gems so they can be instrumented using those same techniques? Once again the answer is to look deep into the Rails source code – and the answer is ActiveSupport::Notifications. A simple and powerful instrumentation API for Ruby available in Rails v3.0 and upward.

Read More

Bootstrap Your Next Project With The HolyGrailHarness

The HolyGrailHarness is a curated Rails application prototype that focuses on simple test patterns for Ruby & JavaScript! Unlike normal Rails Application Templates or more modern Rails application generators like Rails Composer, the HolyGrailHarness is a basic Rails application that can be considered a prototype and customized via a simple setup script. It is also somewhat opinionated in that it promotes simple and powerful testing choices and focuses on using Ruby 1.9 and up, MiniTest::Spec, Capybara, Poltergeist/PhantomJS, and Konacha. More...

Read More
AWS Serverless Hero