Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...

Be careful to name any file @imported by SASS with a leading underscore. SASS files not beginning with an underscore...

The adjust-hue function of Sass allows you to change a color's hue, but only relative to its current...

makandra dev
plugins.jquery.com

SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...

When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...

github.com

Using this gem, whenever a Capybara test in Cucumber, Rspec or Minitest fails, the HTML for the failed page and...

When your Rails controller action responds with only a simple text, render text: 'Hello' may not be what you want...

I use this to simulate the (non-existing) :last-letter CSS pseudoclass, e. g. to insert a tombstone at the...

The error unexpected 'x' after 'DESCENDANT_SELECTOR' (Nokogiri::CSS::SyntaxError) (where x may be basically any character) occurs when the...

When using @media CSS queries, Internet Explorer 8 and below will fail to respect them. Though there are several options...

code-experience.com

React.js is a relatively new Javascript templating engine that has two-way-bindings like AngularJS or Batman. The interesting idea...

makandra dev
menuetos.net

MenuetOS is an Operating System in development for the PC written entirely in 32/64 bit assembly language. Menuet64 is released...

makandra dev

When you want the table headers to always stay around (e.g. because that table is huuuge), use the code below...

If you regularly get ActionView::MissingTemplate exceptions, maybe some bot visits your site requesting silly formats like: http://www.rails-app.com/makandra.html-username-2000...

getbootstrap.com

List of variables used in Bootstrap. Overwrite to customize your bootstrap application. When you are using bootstrap-sass, simply replace...

If you are using Angular and want something like Rails' simple_format which HTML-formats a plain-text input into...

stackoverflow.com

Check out the jsFiddle Demo. CSS .absoluteCenterWrapper { position: relative; /* Declare this element as the anchor point for centering */ } /* Positioning */ .absoluteCenter...

medium.com

When you, as a developer, look at the choices used to build a particular application, you’re blown away at...

gist.github.com

How to remove/disable the automatic XSS protection helper html escaping for Rails 3. This is probably a horrible idea.

requiremind.com

Batman is an alternative Javascript MVC with a similar flavor as AngularJS, but a lot less features and geared towards...

faviconit.com

Eduardo Russo was tired of complex favicon creation and created his own favicon generator. It's really easy and allows...

I had to deal with JavaScript Undefined Error while accessing a specific CKEditor instance to fill in text. Ensure everything...

Ask before leaving an unsaved CKEditor Vanilla JavaScript way, but removes any other onbeforeunload handlers: $(function(){ document.body.onbeforeunload = function() { for(editorName...

Make your custom web font available Add to ckeditor/config.js CKEDITOR.editorConfig = function(config) { config.contentsCss = [ '/assets/myCkeditorStyles.css', // any other file to encapsulate custom...