Angular Style Guide

Opinionated Angular conventions for teams improve code consistency, readability, and maintainability across components, services, and templates.

Slack integration for deployments via Capistrano

Send deployment notifications from Capistrano to Slack channels using slackistrano and incoming webhooks, with customizable message formatting.

Use CSS sibling selectors instead :last-child (or :first-child)

Styling repeated elements with :last-child breaks when unrelated siblings appear; sibling selectors like + and ~ handle spacing and borders more reliably.

Exporting to Excel from Rails without a gem

Generate Excel spreadsheets from Rails views without a gem, using .xlsx.erb templates and avoiding spreadsheet gem limits on performance and styling.

Multiline comments in indented Sass syntax

Indented Sass uses // comments with every following line indented two spaces, making multiline documentation blocks possible.

FactoryBot: How to get the class from a factory name

Look up the model class behind a FactoryBot factory name; FactoryBot.factories.find('admin').build_class returns the associated class.

Speed up file downloads with Rails, Apache and X-Sendfile

Rails can hand file delivery to Apache with X-Sendfile, reducing application-server load and preventing zero-byte downloads when local files are sent.

Detecting when fonts are loaded via JavaScript

Webfonts can change layout after first render; detecting readiness avoids wrong measurements. Modern browsers use document.fonts.load, while older support needs font-dimension watching.

Fixing jerky CSS3 animations

CSS3 animations can flicker or stutter when browser rendering shifts between CPU and GPU paths. Forcing GPU compositing with translate3d(0,0,0) can smooth motion, with possible image-quality tradeoffs.

Sass Mixins vs Extends: The Data - Belly Card Engineering

Sass mixins and extends both support modular styles, but current browsers produce smaller gzipped CSS and faster evaluation with mixins.

Redis Pub/Sub... How Does it Work?

Redis Pub/Sub provides a lightweight way to broadcast messages to multiple subscribers in real time.

Download Google Webfonts

Official Google GitHub repository with binary font files from Google Fonts for local download and installation.

Ruby: Enumerable#partition

Split an enumerable into matching and non-matching groups with Enumerable#partition, returning two arrays and working naturally with destructuring assignment.

SQL: Find out number of rows of all tables within a MySQL database

Count table records in a MySQL database without querying each table separately, using INFORMATION_SCHEMA.TABLES to inspect row estimates.

Sharing cookies across subdomains with Rails 3

Cross-subdomain session cookies in Rails 3 need a shared cookie domain; local development can fail with CSRF token errors when browsers reject the cookie.

Markdown Live Preview

Online markdown preview lets writers see formatting changes instantly, with or without GitHub Flavoured Markdown support.

postgres: window functions

Window functions in PostgreSQL support running totals, rankings, and per-group calculations without collapsing rows; common table expressions can simplify complex analytical queries.

Web Typography for non-designers - Presslabs

Web typography choices strongly affect readability and visual hierarchy, and common mistakes can make text hard to scan or unbalanced.

Remove URLs from the Google index

Remove individual pages from Google search results on a site you control by using Webmaster Tools and the Google Index removal feature.

Compiling Javascript template functions with the asset pipeline

Compile .jst templates into JavaScript functions via the asset pipeline for rendering with JST[...], including EJS and Eco templates.

Carrierwave: Efficiently converting images

Multiple image-processing steps on a CarrierWave version can trigger extra MiniMagick commands; combining options into one process keeps them in a single mogrify call.

How to coordinate distributed work with MySQL's GET_LOCK

MySQL GET_LOCK provides a simple distributed mutex for ensuring only one instance runs across machines without creating lock rows.

Using PostgreSQL and jsonb with Ruby on Rails

jsonb in PostgreSQL 9.4 stores JSON differently from json and suits queries, indexing, and Rails 4.2 integration better for many use cases.

An auto-mapper for BEM classes in Cucumber selectors

BEM-style selectors can be generated from plain-language Cucumber locators, reducing repetitive typing when mapping readable step text to CSS classes.