patrickmarabeas.github.io

Webfonts are not always available when your JavaScript runs on first page load. Since fonts may affect element sizes, you...

...on a string that was previously marked as #html_safe will lead to unexpected behavior. E. g. backreferences to captured groups ($1, $2) will be nil even if the group...

...be safe after using gsub on them. You can, however, fix the $1 gsub behavior on html_safe strings...

makandra dev

...In Rails 3.1+ the asset pipeline will take care of this. Thus you're best off using an uncompressed version of your Javascript in development. Also load the non-minified...

makandra dev
medium.freecodecamp.com

The linked article states that CSS breakpoints should group "similar" screen sizes and thus be at: 600px "narrow"

jeff.dallien.net

x = "Universe" <<-'MESSAGE' Hello #{x} MESSAGE # => "Hello #{x}" That will make the string behave like a single-quoted string, so sequences like \n will be used as they are...

Instead of showing you two lines for each change, Git allows you to highlight changes in a line explicitly:

ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...

...thing to do with any new U2410 should be to disable the incredibly annoying beep when pressing any monitor button. Here is the fastest way to achieve that:

...Sound”; the “Power Save Audio” entry is usually grayed out, so this is 1 beep less than from above.) Right Down Tick Do it this way or your colleagues will...

There is a bug in ActiveRecord 2.3.x that leads to changes in nested forms getting lost. class Project < ActiveRecord...

As you most likely know validates_uniqness_of :foreign_id does not allow nil values by default.

makandra dev

...rc1) must be separated by a dash, like this: 1.0.0-rc1 2.3.0-alpha2 3.0.0-beta3 Publishing to a pre-release tag npm packages have multiple "current" releases, identified by "tags...

Sometimes you want to load code on demand. For instance, when a a large library is only used on a...

You can group contacts using a mailing list in Thunderbird for easier access and less trouble when trying to find...

Since May 2011 we are cutting new gems using Bundler, which is less painful than cutting gems using Jeweler. You...

web.archive.org

This step tests whether a given select option comes preselected in the HTML. There is another step to test that...

RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...

Sometimes it might be helpful to have a version history for a gem, e.g. when you want to see if...

blog.plataformatec.com.br

A while ago we were working on an application that had an entire version specially created for mobiles, such as...

makandra dev
developer.mozilla.org

Basic box shadow support is available in all browsers today, but you need to check to which extend they are...

makandra dev

When you do a script/dbconsole -p, your MySQL shell will already be using UTF-8. When you call it yourself...

Browsers usually cache website content in order to provide the user with faster responses. Examples are returning to a website...

...user@example.com'.split(/([@\.])/) => ["user", "@", "example", ".", "com"] Or, you can use a capture group with look-behind to keep them with the resulting substrings: >> 'user@example.com'.split(/(?<=[@\.])/) => ["user@", "example.", "com"] An example use...

...bug is fixed, you forget to take out that debug information. There is a better way. By copying one of the attached initializers into config/initializers, your forms will always render...

Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release...