// posts, page 5 of 14

Dotfiles II: Choosing BASH Startup Files

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-code that fact. I casually tossed the configuration in my .bashrc. Was that the...

Sudo, Rsync, and Authentication Forwarding

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 ownership sync requires the rsync on the receiving end (which we’ll call server B...

Dotfile Organization Part I: Local vs. Remote

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 your software. (If you don’t then this isn’t the post or the blog for you.)

Invalidate CloudFront and Wait

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 and wait in the same function, but was feeling lazy and left it to the reader. W...

Fun with pushd

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, there is nothing to see here. Both Bash and TCSH have a built in command pushd a...

Get the MIME Type of a Random Upload in Rails

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 can call Mime::Type.lookup on a filename or Mime::Type.lookup_by_extension on an ...

How I Learned to Code Part III

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 post of the series, I’m going to talk about what was the most important learning e...

How I Learned to Code Part II

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”. I went to school for “Computer Engineering”. The school I went to also had “C...