one of my favorite technologies is sqlite. it lets us build apps with fewer dependencies and less devops, which i love. you can run it in memory to create db-backed ruby scripts in a standalone file. i’m a fan of sqlite’s origin story (i started my career working for the navy and dod). i get an irrational kick out of being able to start a rails server in development without needing to also start a…
Well, Rich found the first post . Kinda cool 😎 But then Brian had to go and ruin the ride. Naive, doesn’t actually solve it, PR rejection – vicious. Also, it’s my blog, mate. I’ll decide what the product rules are! But, ugh, he has a point. Here’s pass one shitting the bed just because you opened an email in a new tab: We clear the cookie when you open an email in a new tab, so then when you…
A while ago, I bookmarked this reddit post about generating PDFs. There were some cool sounding ideas in there, and as a web developer, it’s only a matter of time before you’re asked to fill out a paper version of a form. I’ve done PDFs before, with the usual suspects – wkhtmltopdf and wicked_pdf – and it works ok, but never perfectly. It always feels like you’re fighting some styling or page…
This solution has issues we try to fix in part two . Still a useful read for context, though. We’ve been hearing for a while now that HEY would (and did) double down on the frontend architecture Rails and Basecamp are known for – server-rendered-“HTML-over-the-wire”, sprinkles of JavaScript instead of SPA frameworks, no JSON APIs, Turbolinks – something quite against the grain of “modern” web…
I’ve been working with Stripe recently for my latest project, Skilltree . Getting a robust, well-tested integration out the door feels rather involved, and worse, it doesn’t seem like there’s a lot of implementations out there you can reference. So I wanted to show you what I came up with. If it helps you, great! If you think I did something wrong and want to tell me about it, even better!…
Turbolinks is the coolest technology not nearly enough websites are using. And I’m gonna try to convince you of that as we build a simple application together. How you ask? In three steps: First, we’ll build our app like we might have in days long gone (like circa 2008). Second, we’ll React-ify it, and consider the complexity that adds. And lastly, we’ll look at just how little we have to change…
At work, someone posted this code to our #rails channel and asked if there’s a more ruby way to skip the re-assigning of @employees , maybe using yield_self : class EmployeesController < ApplicationController def index @employees = User . employee . includes ( :contact_information ) @employees = @employees . order ( " #{ sort_column } #{ sort_direction } " ) if sorting? @employees = @employees .…
Emoji’s might be one of the coolest inventions to hit cell phones. Just behind the Internet. And texting itself. They’re capable of adding so much meaning, but probably most importantly, they’re fun to use. And clearly, people tend to agree. Most people litter their texts with them. In fact, I can tell when my wife’s displeased with me just by the decreased frequency of smiley faces in her texts.…
I’ve always thought “Gray Matter” would be an awesome name for my blog. My first name is Gray. Gray matter is a substance found in the brain which invokes a certain imagery, and I figured my blog content would air on the intellectual side. And “Gray Matter” taken on it’s own sounds like “matter published by Gray”. Perfect, right?! But then “Breaking Bad” came out before I had a chance to make a…