UI themes in Chrome Dev tools

Chrome now allows you to use UI themes in their dev tools! Yay. To add a theme, find it in the Chrome extensions store. My favorite is the Flatland theme Available on github here To enable Add a theme. Go to your about:flags in chrome, chrome://flags/#enable-devtools-experiments Check the enable devtools experiments Restart Chrome Go to...

Installing Ruby 2.1.1 on Ubuntu 14.04 x86_64

UPDATE: As pointed out in the comments, readline was still not actually installing. As of this update, you can install Ruby 2.1.2 instead of 2.1.1 without the need to configure readline. I was trying to install ruby on the newly released Ubuntu 14.04 and I was running into some issues with readline. The error looked...

gitignore everything inside a directory

There are many cases where it’s important to ignore all of the files inside a directory.  Generally, files such as uploads, logs, and caches should not be stored in your git repository. Lets say you want to ignore all of the files in your /logs directory. You can ignore the entire directory by adding this...

Setting up nginx/passenger and logrotate on Ubuntu

We recently set up a fresh AWS Ubuntu instance running Ruby on Rails on Nginx and Passenger, and I wanted to make sure the nginx log files were included in the server’s lograte.  To do this, I needed to do the following. With a default nginx configuration, you can configure the log directory to point...

Using Capistrano to deploy Drupal (or other non-Rails) projects – step 1

Step 1: install RVM, Ruby 1.9.2 and Capistrano (or skip to step 2) These instructions will leave you with a single-user RVM installation. This works for me because I’m only deploying with one user. If you want more than one user to have access to RVM-installed Rubies on your server, you’ll need go the Multi-User...

Testing Rails 3 with Guard and Zeus

Zeus is a really great tool for speeding up development in Rails 3. It “preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.” Guard responds to changes in your files, making it easy to automate tests. guard-zeus-client tells Guard to use Zeus...

An error occurred while installing libv8 – Mavericks

I upgraded to OS X Mavericks, and I’ve been seeing this error while bundling older Rails projects: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. ... Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher Using compiler: g++ ... An error occurred...

Precompiling assets with Capistrano 3.0.1

For some reason Capistrano 3.0.1 runs rake assets:precompile instead of bundle exec rake assets:precompile. This may cause issues if you have multiple versions of gems installed on your server. I was running into this error. rake aborted! You have already activated rake 0.9.6, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this....

uninitialized constant Capistrano::Configuration::SSHKit

I recently upgraded a rails project to use the latest and greatest version of capistrano (3.0.0) and was faced with this rather unusual error when running any rake command. After a lot of trouble shooting and digging into the new capistrano gem’s source, I realized the error was actually thrown by including the capistrano_colors gem...

Git Subtrees

I’ve been working on a Spree project recently and decided to open source a couple of the extensions about half way through development. After doing a little reading here, here and here I decided a better fit would be to use a subtree. I broke the extensions off into their own repos, forked them to...

RVM aliases

Problem: I recently upgraded RVM, and now every time I cd into a directory with a .rvmrc file that has ruby_string="ruby-1.9.3", I get this warning: ruby-1.9.3-p392 is not installed. To install do: 'rvm install ruby-1.9.3-p392' Unfortunately, I’m too busy to install the newer patch level Ruby right now. Solution: Create a RVM alias that points...

View SCSS in Chrome Dev Tools with Source Maps

@paul_irish recently tweeted about this ( I can’t find the tweet right now so I’ll just summarize ) The one nice thing about writing vanilla CSS is that when something breaks or needs to be tweaked you can pop open the dev tools and find the exact file and line where the offending CSS lives....

Update WordPress & Plugins over SSH

For security reasons, we don’t typically enable FTP on any of our servers. WordPress downloads core and plugins via FTP, so updating usually involves doing it locally and then deploying the changes. In most cases WordPress core isn’t included in the repo, so that has to be done manually : ssh into the server, wget...

Serving @font-face fonts to Firefox from an S3 bucket

I’m building a Rails site that uses the excellent asset_sync gem to push my assets up to an S3 bucket on deploy, and I ran into an issue where @font-face fonts were rendering fine in all browsers except Firefox. After a little googling, I found that it’s an issue with Firefox’s “file uri origin” policy. http://stackoverflow.com/questions/2856502/css-font-face-not-working-with-firefox-but-working-with-chrome-and-ie http://stackoverflow.com/questions/5008944/how-to-add-an-access-control-allow-origin-header The...

Direction aware hovers

Direction aware hovering effects are relatively new to the HTML/CSS/JS realm and codrops has just put out a really great tutorial detailing the philosophy and code behind them. View it here The demo is especially nice as it is an example of how it might be used in the real world. I highly recommend taking...

Highlights from the HTML5 Weekly

So, if you are not subscribed to the HTML5 Weekly newsletter, you might want to get with the program. For the uninitiated, the editors describe themselves as: A free, once–weekly round-up of HTML5 and browser technology news and links. CSS 3, Canvas, WebSockets, WebGL, Native Client, and more. In addition to browser tech news, I’ve found...

Front-end development bundle for Google Reader

Paul Irish, one of our favorite front-end devs, put together a list of must-read blogs for front-end development. At a whopping 258 feeds, it’s a pretty heavy hitter. Luckily, one of the commenters of the original post culled it down to the essential blogs (the ones with posts in the last 6 months). That comment...

Code Cards: Christmas cards for your compiler

When not solving problems in usability, our very own Matt Raw makes handmade letterpress Code Cards that can, among other things, help you express love in HTML. Now he and Campbell Raw Press have come up with a series of new compiler-friendly Christmas cards to send your favorite developer this holiday season: Raw eggs, sugar, and copious amounts...

Pimp out your rvm profile

We’ve been using RVM for all our Rails projects here at Blenderbox for some time and we’ve made it a whole lot easier to use by adding this .rvmrc file to the root directory of all our projects. #!/usr/bin/env bash ruby_string="ruby-1.9.2" gemset_name="gemset-for-project" if rvm list strings | grep -q "${ruby_string}" ; then # Load or...

What is a modern web application?

On Sept. 10th I attended a presentation by two Developer Advocates at Google, Pete Lepage and Jan Kleinert. Pete was kind enough to share the slide show he used for the presentation on his website. I found it very informative and thought I’d share a summary. The subject of the presentation was : What is a modern web application?...