Using Solid Queue in Development with Docker and on Heroku
I recently started a small project that needed Active Job and thought I’d try out the Solid Queue backend. If you haven’t been keeping up, Solid Queue is a d...
I recently started a small project that needed Active Job and thought I’d try out the Solid Queue backend. If you haven’t been keeping up, Solid Queue is a d...
I won’t do PHP for love or money. Since it’s known that I’m a Software Person, friends and relatives will occasionally ask for help with some random issues a...
It’s been a while since I posted a Emacs build walk-through, one version of macOS has come and gone and a new major version of Emacs has arrived, let’s get t...
If you password protect your SSH keys (and you should) and you don’t store those passwords in your macOS keychain or Linux equivalent (slightly paranoid, but...
Not long ago I shared a Bash function that takes filenames in the form of filename.rb:NNN, where NNN is a line number, opens the file in Emacs, and jumps to ...
Another, macOS (Mojave), another major Emacs release, let’s get building.
Long ago I shared my EmacsClient setup. The short of it was that I always have Emacs running and set $EDITOR in such a way that things like git commit open a...
macOS High Sierra is out and it’s time once again to build Emacs. Nothing has really changed since my 2017 Sierra update, but let’s put it all together… Bef...
If you try to build Ruby 1.9.3 using rvm install ruby-1.9.3-p551, it will barf with compiler errors. The workaround, found here, is to use:
A quick update to Building Emacs on macOS Sierra. I recently had to rebuild Emacs due to brew updating the version of libjpeg. My walk-through almost works, ...
An update to my somewhat popular How I Start Rails Projects post. As before, I start with:
Ever put your Mac to sleep only to come back find it’s still awake? This happens because something is telling the power management subsystem it can’t sleep y...
A quick one today — creating S3 Static Website Hosting redirects with the AWS CLI. Clients often want to have www.example.com redirect to example.com or vice...
OK, you’re in a situation when you can’t use cookies, specifically you’re in an iframe and Safari will only accept a cookie in an iframe if the browser has a...
So, I’ve looked at the utility and security of cookies and I’ve at looked the utility and security of sessions. It you’ve been following along, then you know...
A quickie this time. I use Capistrano to deploy my Rails apps. There was a gem for Capistrano 2 that added an ssh command as in:
Last time I took a reasonably deep dive in cookies. Cookies can keep state information and setting for visitors to a site. However, by default they aren’t se...
I’ve been working on a post about using JWTs JSON Web Token (JWT) when you can’t use HTTP cookies for sessions. As I dug into it, I came to realize that unde...
A quickie this week. When I’m wearing my Ops Hat (I totally need to make me an “Ops Hat”, something with lights and a grappling hook), I often find myself se...
JSON Web Token (JWT) have come in to my life. I like them and you will too… Pronounced “jot”, the short version is that they are cryptographically signed blo...
whois is a command line tool to look up registration information for domains, things like owner, location, and contact info. WHOIS (all caps) is a protocol f...
Speaking of secrets, here’s how I keep them in the shell. Why do I have secrets in the shell? Typically, they are things like API keys and passwords for web ...
Last time, I looked at keeping environment specific configuration using YAML files and Rails.application.config_for. One big issue with this approach is secu...
Previously, I looked at the simply way of creating Rails stages that shared same configuration with Production by simply importing production.rb into the new...
A quick tip — When I’m deploying Rails apps to Staging or Beta I try to keep the configuration as close to Production as possible. I’ve gotten bitten one too...
Well, I might as well round out my Server Name Indication (SNI) sort of series by taking a look an nginx. Does your nginx support SNI? You can check by runni...
Last time, I looked at configuring Server Name Indication (SNI) with Apache. It just so happened I needed to set up SNI with the HAProxy Load Balancer last w...
I covered Server Name Indication (SNI) a while back, but it still surprises me how little people know about it. So, it’s time to look at configuring Apache t...
Ever gotten a disk full error, only to run df and not see any full disks? After banging you head against the wall for a while, you remember to run du -i and ...
Sometimes you have to write a new Rails app for old data. One approach is to keep the old format and carefully craft your ActiveRecord models to work with th...
An update to an older post about using the iOS Simulator from the command line.
A quick addendum to my previous ngrok post. If you are not using subdomains, it can be useful for your app to know what ngrok’s dynamically generated URL is....
I’ve been using ngrok on quite a few projects lately. I’ve written about it before, but in short, it solves to problems for me.
Everyone has their patterns, here’s mine for starting a new Rails project:
Important update -> here.
I was recently shown the Best. Chrome. Extension. Ever.
Recently (I seem to start a lot of posts with “Recently”), I was on the road needed to access a server that was behind a firewall. There was no VPN and acces...
A post or two back, I looked at having BASH detect if I was on my “desktop” (for lack of a better word) or a server and decided the best approach was to hard...
rsync will happy copy files between servers and will keep the ownership and permissions the same. However, if you aren’t the owner of all of the files then o...
I’m embarking on a long, long over due project to organize my dotfiles, you know, all those files in your home directory that start with “.” and configure yo...
In my occasional series on waiting for things, I setup a BASH function to wait for AWS CloudFront invalidations. I mentioned it would be possible to invalid ...
Here’s about as esoteric a post as I ever write, my love of pushd and it’s little abused directory stack. If you don’t live on the command line, move along, ...
If you have a lot of SSH keys loaded you may run into the dreaded:
It’s surprisingly hard to find info on getting the MIME type of a file in Rails. Rails has MIME::Type (and the confusing and undocumented MIME::Types). You c...
A quickie today on leveraging “the cloud” for warm-ish spare servers.
So, first I talked my first programming experience, learning via type-in programs. Then I looked at the shotgun approach my university took. In this final po...
Last time I talked about my first experience with coding, entering and debugging a type-in program on a mainframe. This time, how I learned “Computer Science...
It’s Boulder Startup Week. With so many tech startups in town, there a lot of focus on code and coders. How do you become a developer? What developer career ...
A couple of posts back, I showed off some functions to pop up notifications when a host became pingable again or when a port became reachable. Today’s (semi)...
Lately, we’ve been playing with AWS and waiting around - let’s combine the two.
I hate waiting, but I have to do a lot of it. Waiting for servers to restart. Waiting for services to come up. Waiting around for a Yes or a No. To that end ...
A couple of posts back, I wrote about how you can get status info out of a long running dd process by sending it a signal. The functionally is something you ...
OK, so you know how to get data into AWS S3, what about getting it out? Previously, we uploaded entries from an imagined photo contest into a bucket. We sent...
dd is the *NIX byte copying utility. It’s typically used for copying disks, creating disk images, or initializing disks from images. It can also be using to ...
A couple of posts back, I walked through uploading an image to AWS S3 without the need for a server of your own. This has the advantage of being a fully stan...
Previously, I covered uploading to S3 from a Rails app using a presigned-url. This works just fine, but means the data flows from the visitors computer to yo...
Last time, I walked through directly uploading an image to an S3 bucket from the browser with no server involved. That last bit is important. If you are usin...
Want to upload an image directly to S3 from the browser? Here’s what you need.
Previously, I worked through how to get messages from an IMAP server and work with the message headers. Let’s look at extracting data from those messages. A...
There’s a really solid, tried and true, Internet wide messaging queue. It’s been around for decades and has first class support in Ruby. What is it? Email. T...
Here’s something slightly random and the exact opposite of technical, the Bullet Journal.
If you are reading my blog, odd are you already know how to use ssh-add to manage you SSH keys. If not, you can read up on it.
Recently, I had the task of speeding up the response time of an app that depended on a remote API. The issue was that the API could take a long time to respo...
For some reason, I can never remember the right command line option for setting the Host HTTP header with curl. It’s actually something I need to do fairly r...
When you’re developing Rails apps or pretty much any other framework you can name, you typically work with a server running on localhost. This is all well an...
I occasionally write about encryption in Ruby, yet somehow I haven’t managed to cover my friend Ara’s Sekrets gem.
Hit a bug, couldn’t find the answer, documenting it here for the next person.
The Emacs Visual Bell issue I previously wrote about has been fixed.
Writing a blog turns out to be hard. This blog has been around since 2007, but at most, I wrote something three or four times a year. In late 2014 I committ...
Last week I wrote about my issue with Emacs’ visible-bell on OS X El Capitan. I figured it was about the most esoteric thing I’ve written, but it may have go...
After I upgraded to OS X El Capitan, I started having random display issues with my build from source version of Emacs. After a while I realized that it was...
Once you have a CA configured, you need to setup the Apache Web server to use it. The process of requesting the certificate from the browser and verifying th...
Previously, I wrote about the promise of using Client SSL Certificates for authentication. With this post, we start down the road of actually putting this in...
Ever had to change the URL in 50 files? What do you do?
Holy crap! You can use SSL client certificates to easily authenticate user logins!
Sometime I want all of Rails’ form bells and whistles for something that isn’t a database backed model. For example, I use this as a handy way to get form va...
A while back I wrote about Diceware, a system for generating password using dice and a word list. I also include a Ruby script that use virtual dice.
This is one of the blog posts to set something in my mind that I’m always looking up. Linux has lovely tools for adding and managing users, but I can never r...
Every wondered what the timestamps on files on UNIX sytems mean?
How to you take a list of files and do something with them in the UNIX shell? xargs is the key.
I’ve touched on shell aliases and functions a few times, today I wanted to get in to a little more detail on passing arguments to them.
Another progress update on my RepRep 3D Prusa Mendel. After digging into the laying issue, I narrowed it down to a likely slicing issue. And, after a lot of ...
A quick update on the RepRep 3D Prusa Mendel I’m working on. I made a print! Several actually.
There’s a handy tool for Mac users that I rarely see getting use, the SSHFS filesystem. SSHFS is a FUSE filesystem uses the SSH File Transfer Protocol (SFTP)...
Previously while talking features of the HTTP Range header I wrote:
In my previous post about codeless APIs I made use the HTTP Range header to download only a portion of the file from a web server or cache (byte serving).
What if I told you that you could create a API backend that didn’t require any code? Crazy right? Wrong! Picture a client side Javascript app that displays ...
When I run into a problem I can’t and the Google doesn’t have it, I document it for the next person.
A quickie today, renaming a bunch of files in the shell. Unix gives you million ways to do it, here are a few that will help you understand your tools better.
There’s one Ruby gem that make it into practically every Ruby project I write, my friend Ara’s Map. Really, it’s a coincidence that I know Ara, this gem spee...
To securely access your servers you use SSH keys. Passwords can be guessed, just look in your logs to see all the people trying. But, you know that. You’ve g...
So, you’re on a rescue project with some legacy code (and by “legacy” I almost always mean PHP). The old developer probably just FTP’ed changes up to the ser...
While the fame and free cars are nice, the reason I blog is to learn, or, as in this case, to help me remember things.
I like iTerm 2 (and I can not lie). I use a Mac and spend most of my days in the terminal (and Emacs). When a window system first came into my life, it was X...
Previously, I wrote about backing up files to Dropbox with rsync. I automated the process with cron the ancient UNIX “time-based job scheduler”. While OS X s...
This is a bit of a departure from my usual Ruby, Ops, and Security posts. However, recently I acquired a mostly completed RepRep 3D printer and wanted to doc...
One simple way to back up files is to copy them to Dropbox. However, manually copying files does not constitute a good backup, you’re going to forget.
In my last post about an alias that opened a URL from the command line, I said:
If you’re ever sitting in a Git repository in the shell and want to view it on Github, here’s some quick laziness.
I wrote and maintain (though not as attentively as I’d like) a Ruby Gem, Strongbox, which adds Public-key Encryption support to Rails’ ActiveRecord. Simply p...
When I need to test web apps on an iPhone or iPad, I use the iOS Simulator that ships with Xcode1. The Simulator is intended for developers testing native ap...
A visitor, Rakkesh, stopped by with a question about Building Emacs 24.4 From Source on the Mac. He had an issue that when he built Emacs on one machine (a M...
Making up passwords is hard. You want something you can remember which is and you need something difficult to guess or brute force.
I have lots of shell aliases/functions for repetitive tasks. Copying files to and from servers, removing editor backup files, connecting to specific database...
HTML5 <audio> tags is pretty straight forward. Given:
Previously, I showed how I set $EDITOR. On my laptop, I actually do something different to take advantage of my favorite Emacs feature EmacsClient. EmacsClie...
TL;DR - This won’t work:
My editor of choice is Emacs. However, in a pinch I can drive vim or vi just fine1. While I prefer Emacs, I can’t think of a UNIX-like operating system that ...
How you clear the DNS cache on OS X has changed yet again…
Emacs 24.4 is officially released and Mac OS 10.10 Yosemite has arrived. As always, time to build.
In the Internet age we live in, it’s not uncommon for web servers to be hit with Unintentional, not so Distributed, Denial of Service (DoS) Attacks. The atta...
I often find myself needing to download files to my local box via SCP. Which means entering the hostname, the path, and the filename in to my terminal window...
I’m lazy and I’m always looking for ways to avoid any unneeded typing. Here’s a little OpenSSH configuration tip that can save you up to 16 characters (if yo...
Sometimes an AJAX request on a page you’re developing needs to hit a server on a different domain. Web browsers’ Same-Origin Policy means (among other things...
As part of the work Indra did for Stand Up To Cancer’s telethon, I need to make use of Convio/blackbaud’s Luminate Online Server APIs. Luminate Online is a w...
Yesterday, I was involved in a fire drill around the launch of a new Rails site on a very tight time frame. The site worked fine in development/staging, but ...
If you try to build Ruby 1.8.7 with RVM you will see:
Previously, Strongbox, my gem for using Public Key Encryption with ActiveRecord, allowed only one key pair for encrypting all of the records for a given Acti...
As always, I like building Emacs for my Mac from source. It lets me live on the cutting edge and have tigher control of the version I’m running. If building ...
After years of running on Wordpress, today I’m relaunching my blog using Octopress. Octopress is a blogging framework build on top of Jekyll which in turn is...
Pow is a zero-config Rack server that makes developing Rack apps (include Rails apps) a snap on Mac OS X.
There’s plenty of documentation on how to deploy “Classic” style Sintra applications with Phusion Passenger, but it’s not immediately obviously how to deploy...
Instead of having a dedicated login page, some sites return a 403 Forbidden HTTP status code and include the login form in an HTML body of a custom 403 page....
I’ve given a number of examples of using Public-key cryptography in blog posts and in the Strongbox documentation, but I’ve always generated the RSA key pair...
UPDATE: Emacs.app builds fine (and has for a while) as a 64 bit application.
Scott Chacon, one of the guys behind GitHub, has released Pro Git, which, as the name suggests, is a new Git book. He’s made it available under the Creativ...
I recently came across John Nunemaker’s take on using “unless” in Ruby and thought I’d share my two cents.
Over a year ago I wrote the wildly popular Encrypting Lots of Sensitive Data with Ruby (on Rails). At the end I said: Clearly, this screams for a plugin; w...
I’ve been using Emacs for more than 20 years now. I still use it just about everyday on servers I admin. However, a year or so ago I started using TextMa...
So, you have a column in your database you can’t update after the record is created. Not don’t want to update, but can’t. Specifically, you might have a c...
Rick Olson’s attachment_fu is a great plugin for attaching files documents to Rails models. It’s a rewrite of his acts_as_attachment plugin. While it can h...
Previously I wrote about how to use public key encryption to automatically encrypt data using Ruby (and thus Rails). Because this method can encrypt data wi...
In Encrypting Sensitive Data with Perl I wrote about how to use public key encryption to automatically and securely encrypt information with Perl. This allo...
It’s not uncommon to have information submitted through a web form that you need to save, but don’t want to have lying around in plain text. Credit card numb...