github.com

Using this gem I could get JSON generation from a large, nested Ruby hash down from 200ms to 2ms.

makandra dev

Confusingly, RVM installs the bundler gem into the @global gemset, which is available to all gemsets and Rubies.

To bind an HTML value to ng-bind-html, you need to mark it as "trusted" first. Among other ways...

When you need to check a value for presence, don't rely on JavaScript since it considers 0 or "0...

makandra dev

Put the font files (e.g. ttf) into ~/.fonts Run fc-cache -v Or, if you prefer to use the GUI...

Firefox 5.0.1, which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here...

makandra dev
tex.stackexchange.com

tlmgr is the TeX Live Manager and responsible for the TeX installation on your (Linux) machine. If you're getting...

makandra dev
blog.idrsolutions.com

If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...

Just install the texlive-xetex package: sudo apt-get install texlive-xetex Running integration tests without texlive-xetex will produce...

You select some characters, make them bold and suddenly your entire document is bold? Here's how to fix that...

Browsers make this very hard. Even when you explicitely set the selection inside the textarea (e. g. using jquery-fieldselection...

marvin.soup.io

If you have this problem when you update your FreeBSD Ports: ===>>> Launching child to update ruby19-iconv-1.9.3.547,1 to...

The asset pipeline changes the paths of CSS files during precompilation. This opens a world of pain when CSS files...

JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:

docs.angularjs.org

In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing...

api.jquery.com

Simply use one(...) instead of on(...). It takes the same arguments.

Since we are using LoDash instead of UnderscoreJS in recent/current projects, you should keep in mind that their syntax is...

github.com

bower-rails is a great solution for managing vendored assets in your Rails app. It feels especially much more convenient...

github.com

JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' };

gist.github.com

A nice bookmarklet to analyze how many watchers have been registered on the current page. Good for keeping an eye...

Creating records in specs can be so fast that two records created instantly after one another might have the same...

Returning an empty scope can come in handy, e.g. as a default object. In Rails 4 you can achieve this...

We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...

p ActiveRecord::Base.connection.indexes(:table_name)