About Piwik

Open-source web analytics with self-hosting improves privacy and data protection, but reports are delayed and often limited to date ranges.

The Current State of Telephone Links | CSS-Tricks

Desktop browsers often handle tel: links poorly, while mobile browsers open the phone app automatically. Detecting useful phone-link support is not possible.

Represent astral Unicode characters in Javascript, HTML or Ruby

Unicode symbols can be hard to enter reliably across tools, and astral characters or non-breaking spaces often need escapes or entities instead of pasted text.

Ubuntu MATE: Shortcut launcher for a web application

Launching a web app from the MATE panel avoids unreliable Chrome desktop shortcuts and opens sites like Google Calendar in a separate app-like window.

Google Chrome: How to find out your currently installed theme

Finding a Chrome theme again can be hard when the name is forgotten. The installed theme name or Chrome Web Store ID can be recovered from Chrome settings or the Preferences file.

Name that Color

Maps a hex color code to a standard-sounding color name, making it easier to choose readable Sass variable names for extracted palette values.

About the HTML and the BODY tag

html and body behave differently from normal elements, making them poor choices for layout, sizing, and positioning; use them mainly for global defaults.

Ubuntu MATE: Add a new panel

Adding a second MATE panel lets you place separate launchers, menus, or indicators on another screen or position without replacing the existing one.

Using Google Analytics with Unpoly

Google Analytics pageviews can be missed in Unpoly apps because only the first full page load runs the tracking script. Track fragment updates with up:location:changed or a custom up.compiler.

There is no real performance difference between "def" and "define_method"

def and define_method have no meaningful performance gap in typical Ruby code; only very short methods show a small difference, while closures can affect garbage collection.

ActiveRecord subselects - Today I Learned

Passing a second scope into a hash condition turns it into a subselect, useful when simpler querying matters more than performance.

Images darken when getting converted with ImageMagick

CMYK images can appear darker after conversion with newer ImageMagick versions because RGB and sRGB handling changed. Using -colorspace sRGB preserves the expected brightness.

The Codeless Code

A series of short stories about monks and nuns in a programming monastery, blending software lessons with parable-style lessons.

has_one association may silently drop associated record when it is invalid

has_one autosave can drop an invalid associated record without failing the parent save, leaving the parent persisted and the child unsaved.

ActiveRecord autosave

Child objects can be saved automatically with their parent in Rails, reducing manual persistence work and keeping associated records consistent.

Ruby's default encodings can be unexpected

Plain Ruby strings can inherit inconsistent encodings from Encoding.default_external, causing incompatibility errors when text comes from StringIO, CSV, files, or IRB.

Ruby 2.3 new features

Ruby 2.3 adds safer nil handling, easier hash access, subset comparisons, numeric predicates, and negative filtering for cleaner collection code.

Download Ruby gems without installing

gem fetch downloads .gem files without installing them; dependencies are not included, so packages can be saved for inspection or offline use.

Ruby 2.3.0 has a safe navigation operator

Ruby 2.3.0 adds &. for nil-safe method calls, preventing NoMethodError when receivers can be absent while leaving false behavior unchanged.

Linux: Find out which processes are swapped out

Linux can move processes or even process parts into swap, which may affect performance. vm.swappiness controls how aggressively the kernel uses swap.

virsh reload xml config file

Reloading a libvirt domain configuration after XML edits avoids restarting libvirtd; virsh define reapplies the updated definition.

Ruby 2.3 brings Array#dig and Hash#dig

dig safely retrieves deeply nested values from hashes and arrays, returning nil when any part of the path is missing. Ruby 2.3 adds Array#dig and Hash#dig for this pattern.

Hack of the day: One-liner to run all Cucumber features matching a given string

Run only matching Cucumber feature files by searching .feature files for a string and passing the matches to geordi cucumber; similar xargs pipelines work without Geordi.

object-fit polyfill by lazysizes

IE lacks object-fit support, but lazysizes can polyfill image and video fitting with contain or cover behavior.