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...

Since version 34, Chromium/Chrome ignores the autocomplete="off" attribute on forms or input fields. Recent versions of other browser do...

If you parse this Yaml ... yes: 'Totally' no: 'Nope' ... you get this Ruby hash: { true: 'Totally', false: 'Nope' }

You are probably using Ruby 1.8.7 with a too recent versions of Rubygems. Downgrade your Rubygems to the latest version...

If you get this error when you try to resize an OpenStack instance: # nova resize example 23 --poll

makandra dev
tldp.org

There are 3 built-in file descriptors: stdin, stdout and stderr (std=standard). (You can define your own, see the...

guides.rubyonrails.org

config.action_controller.action_on_unpermitted_parameters enables logging or raising an exception if parameters that are not explicitly permitted are...

makandra dev

If you once had HTTP Strict Transport Security enabled for a domain, and you want to disable it again, you...

Edge Rider gives your relations a method #origin_class that returns the class the relation is based on.

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

Spring is a Rails application preloader. When debugging e.g. the rails gem, you'll be wondering why your raise, puts...

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...

Programatically invoke Rails generators Require the generator, instantiate it and invoke it (because generators are Thor::Groups, you need...

docopt.org

docopt helps you define interface for your command-line app, and automatically generate parser for it. docopt is based on...

Rubygems can produce lots of deprecation warnings, but sometimes, you cannot fix them. To have a tidy terminal with output...

If you want to label things with a color but don't actually care which cholor, you can use the...

So you have a restangular collection and you want to remove an element from it, after you've successfully deleted...

With this command you can initiate an application restart without touching restart.txt. Unlike touching restart.txt, this tool initiates the restart...

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...

github.com

better_errors is an awesome gem for enhanced error pages in development, featuring a live-REPL for some light debugging...

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

linux.die.net

Sometimes you may want to print files from the command line, especially when you have lots of them.

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass...