Why is this useful? You can have a background image on the same element, overlaying it with a transparent gradient...
When is this useful? When both parent and child elements have borders, with this technique you don't get two...
Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...
Browsing the git stash is a bit tricky. Here is how to see the changes without applying them:
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
Given you store files on Amazon S3 and you need to stream those files out to people while you don...
This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...
Assuming the following sunspot setup of the post class: class Post < ActiveRecord::Base searchable do text :title string :state
In Rails 3.1+, instead of defining a separate up and down method you can define a single method change:
Sometimes you need to remove high Unicode characters from a string, so all characters have a code point between 0...
In a nutshell: Capybara's find will not work properly on nodes from a list. Don't find on elements...
Why string sorting sucks in vanilla Ruby Ruby's sort method doesn't work as expected with special characters (like...
This is a way to run multiple redis server on one ubuntu server. These steps you have to do only...
How to get a backtrace from a running Ruby process: Ruby 2.6 # First, find out the PID of your Ruby...
I followed this nice guide Connecting to MSSQL with Ruby on Ubuntu - lambie.org until I ran in the following errors...
This article shows how to create a Sass mixin for a colored button. The button's foreground color is dynamically...
When your model is using a callback like before_save or before_validation to calculate an aggregated value from its...
Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the...
In MySQL comparing zero to a string 0 = "any string" is always true! So when you want to compare a...
Imagine you have a piece of code that tries to send a request to a remote server. Now the server...
Ever seen this error when using Graticule? Numerical argument out of domain - acos Similarly to the to_sql problem for...
The following snippet demonstrates how you could create excel files (with spreadsheet gem) and format columns so that they follow...
You want Photoshop to always open files with "full" (100%) zoom and not try to fit them to your screen...
Though Internet Explorer 9 supports the box-shadow CSS property there is a nasty bug which sometimes prevents it from...