#tech

We rebuilt our site to be faster, future-proof, and fun to work on.
or: How I Learned to Stop Worrying and Love Placeholder Selectors
The following technique requires high test coverage. Where does the default_scope get used? We can print a stack trace whenever the default_scope is used.
Looking for a managed hosting provider for your WordPress site? Click on the link below to access Singlebrook's 20% off coupon for WP Engine hosting!  - Improve conversion rates with a faster site on WP Engine. Save 20% off your 1st payment...
At Singlebrook, we're using Styleguide Driven Development to create efficiency and strengthen code quality. Jeff Amaral led a session at Cornell Drupal Camp 2015 on the topic of Styleguide Driven Development. He has shared his slides here as...
If you're like me, you've hit a wall before where CSS falls just a little short of what you want to accomplish with your responsive design. And like me, perhaps you turned to jQuery to tweak things slightly when users visit your...
Combining Drupal core’s view modes and theme regions with a small home-grown module created a new way to lay out node pages.
When I first joined the Singlebrook team, one of the things I was most excited to learn about was git; in fact, my first ever Singlebrook blog post was a brief-but-giddy overview of the program. In the months since then, I’ve...
A post to the Ruby on Rails security list yesterday revealed a pretty serious vulnerability in ActionController's handling of implicit controller actions. (You know, when a controller doesn't have a certain method defined but it's successfully...
My last article Modernize Your Drupal Theme tackled adding some modern touches to your legacy Drupal themes such as SCSS and Compass. With Drupal 8 on the horizon, Drupal theming is changing in some substantial ways. I'd like to take a look over the course of a few posts at the process of converting a current Drupal 7 theme to work with Drupal 8.
Most of you have probably already heard of the Heartbleed Bug, an extremely serious security vulnerability announced this week that affects large swathes of the internet. Incredibly, the bug has been around since March 2012, and...
Underscore.js, as described on their website, is "a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the...
TL;DR: Add our utf8-cleaner Ruby gem to your Rails app and kiss request encoding errors goodbye! Our Rails apps send us error reports by email every time a request results in a 500 error. Sometimes these are legitimate bugs, and we can roll...
Front-end web development is a hotbed of innovation. The Javascript world is brimming with new frameworks like Backbone, Ember, Angular, Voxel, and Three. There are a lot of exciting technologies to learn to keep our minds busy...
2013-11-17 - @jaredowenbeck - Firefox 25.0.1, released 2013-11-15, implements some exciting new ES6 functions, taking the lead in ES6 adoption among browsers. https://medium.com/what-i-learned-today/10fb8478f9c1 - Jared gives an overview of the new...
Now that we've got a few full-time remote workers, we're really interested in making sure that they feel like part of the team. Telepresence really helps with that, and one great, free telepresence tool is Google+ Hangouts. We...
"In this world nothing can be said to be certain, except death and taxes...and software updates." -Benjamin Franklin - Okay, so maybe I added that last part on, but it's true: in a world that surrounds us with ever-changing...
Building upon Alexandra’s great post, Maintaining your Sanity while Theming in Drupal, we decided that it was time to standardize the process of creating new Drupal projects so that we could be up and running in...
Display the second level menu items of the currently active page, fully expanded, in the left sidebar of every page but the node edit form. And have this configuration saved in code so that every member of your...
I still remember the first time I realized the power of "C" in CSS. Sass and LESS take cascading to a whole new level of fun and power, and if you're not already using it, then you're really missing out. I've long known about...
Read this gist on github.
TL;DR Make sure you increase innodb_buffer_pool_size from the stock value!
*Feel free to browse the code from this tutorial in my sandbox repository at Drupal.org. In Part 1 of this tutorial, we created a custom Bean type that provides reusable blocks of tweets from a specified twitter user. In Part...
*Feel free to browse the code from this tutorial in my sandbox repository at Drupal.org. This tutorial is a follow-up to a recent article on Minimalist Drupal Development, where I made the case for judicious module selection...
Drupal has emerged in recent years as an extremely flexible and powerful resource for creating web applications. It's done that by creating an infrastructure that simplifies the process of building new functionality and an...
Because I switch between ColdFusion and Ruby on a weekly basis, when I work on ColdFusion I sometimes miss some of the features that I have in Ruby. Like having a hash return a nil when a key doesn't exist, rather than getting an error when a key...
Don't just disable SSL, install the intermediate certificates from the Certificate Authority (CA).
After Parallels died on me earlier this week, I went looking for a quick and easy way to install a new set of Windows virtual machines on my Mac. Ievms via xdissent  makes it stupid simple to get a testing environment up...
This Saturday, 2013-02-02, the first update to RMagick in nearly three years was released: 2.13.2 - One of the most useful changes is support for ImageMagick 6.8 (pull request), the current version from brew.  If you're...
Being relatively new to Drupal, I was overwhelmed recently by the task of implementing a base theme and three sub-themes for a customized system of Drupal sites we were developing at Singlebrook. I needed a clear, simple way to...
Over the past few months we've been using Behat and Mink for acceptance testing on a large Drupal distribution we're building (further background reading here). Overall, the transition from our comfy rails testing tools like...
Last month, several Singlebrook developers participated in Ithaca’s Global Day of Code Retreat. The event had a very simple structure; the day was broken into several 45 minute pair-programming sessions - switching partners...
I've now run into trouble when using "localhost" as my database server address with a couple of unrelated database servers, namely MySQL and Microsoft SQL Server. At this point, it seems like a good rule of thumb to always use...
I've always heard that kill and kill -9 send different signals but I never knew the details.  The The GNU C Library has a good reference of the  termination signals, and man -S 1 kill explains the numbers. ...
Here's a nice ruby 1.9 discovery to brighten your day. In 1.8 we had to: - require File.expand_path('../relative/path', __FILE__) - but in 1.9 you can: - relative_require 'relative/path'...
If you're using a CDN to serve your static assets, your webfonts may break if you don't provide the correct CORS headers. Update: be sure to turn...
I’ve always thought of User Interface (UI) Design as some sort of nebulous, abstract idea, encompassing visual design, information architecture, user experience, and above all, clear organization and navigation. In reality, it...
One of our clients has a MySQL server that sees moderate load. The MySQL server process often spikes one of the server's two CPUs. Without a lot of prior experience in tuning MySQL, I set out to figure out what was causing this...
Out of the box, rspec likes to dump all of the specs to stdout: - $ rake spec - ruby -S rspec ./spec/controllers/activity_categories_controller_spec.rb ./spec/controllers/attendee_controller_activities_spec.rb...
I was quite confused when I saw lines like this in controllers that I was working on: - Sign in user? Is it that easy? Do I just type what I want in plain text and the computer will know what I’m talking about? Well, no, of course not...but as someone new to the system, these sorts of conventions can be really confusing. If you find yourself in this position, then you are probably coming from another language where class inheritance worked differently from Ruby.  -
Last night I wrote this fun code to see if I could display a Mandelbrot fractal in my terminal. It was easier than I thought, thanks to some pseudo-code on the Mandelbrot Set Wikipedia page, although tracking down the proper...
I just upgraded one of our sites on Heroku to Postgres 9.1. Here's how I did it.
Facebook announced in February of 2011 that they were deprecating the "share" functionality, which provided an easy way for users to share a link or page to their feed. What was nice about sharing, from a development perspective, was that you...
I was exploring various ways of creating a namespace for my application's functions and I wasn't happy with any of the options I found. My requirements were something like: -
Recently I set out to create a site specific FireFox add-on. This became a journey with many rough patches. One of the most useful things for writing anything that modifies and interacts with a website's content is the jQuery library. It allows...
Sass-convert can do nesting and also collapse selectors with identical properties!
An interesting learning experience with SSH.  -Jared Beck -
A big victory for sustainable business is being celebrated on February 10th as leaders of the benefit corporation movement gather in NYC to file changes to their corporate structures under new New York State legislation. A benefit corporation is a...
In which Aaron finds and fixes slow spots in Bundler and ExecJS and makes it look easy.
Summary: Use pg_restore -j number-of-jobs to restore an "archive format" dump in parallel.
We recently upgraded one of our internal Rails projects to 3.1 and included the asset pipeline as part of the upgrade. Everything worked peachy in development, but when we'd compile and compress our JS assets, our JQPlot charting library would not...