...initializer provides a default way to deal with this. You'll get the following behaviour: if the incorrect request has a HTTP_REFERER coming from the same application, set a...
...table names and execute a DROP TABLE statement for each. DO $$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP EXECUTE 'DROP...
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low...
...the tree structure, but just replicate all the needed data into the database, the best option is to use SAX parser. When you read very large XML files Nokogiri may...
During debugging you might pepper your code with lines like these: console.log('foo = ' + foo + ', bar = ' + bar) I recommend to use...
When such a virtual attribute should contain Date values you might get unexpected behavior with forms, because every param is a string and you don't get the magic...
The Angular 1.2 way: # By default, angular returns undefined for invalid attributes which removes # the value from the form field...
...specifying the controller as 'user/...' would make Rails expect views in view/user/... (singular) The better approache might be to use a module. See this card on how to namespace with...
When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...
When such a virtual attribute should contain integer values you might get unexpected behavior with forms, because every param is a string and you don't get the magic...
When using git diff, you might encounter weird characters where umlauts (or any other UTF-8) characters should be. It...
You know that you can use jQuery's text() to get an element's contents without any tags.
...on table rows (use case would be clicking the 1st link inside it for better UI). Consider this setup: hello ^ $(document).on('click', 'tr', function () { alert('row clicked') });
When building a form with a file select field, you may want to offer your users a live preview before...
...browser. You don't need CoffeeScript or an ES6 transpiler like Babel. A cosmetic benefit is that the module pattern works without the use of this or prototypes. Example
When you get an error like this: Invalid gemspec in [/opt/www/foo-project.makandra.de/shared/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec]: Illformed requirement ["# 1.1.4"] ... the machine's Rubygems needs to...
When running an older version of docker-compose you might see the following error: ERROR: Version in "./docker-compose.yml" is unsupported...
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
Consider this HTML: Even though the surrounding container defines a line-height, which vertically centers its inline elements, the check...
If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...
You probably already manage servers you often connect to inside the ~/.ssh/config file. What is nice: you may define alias...
...link_tag 'screen', :media => 'screen' %> These would be your two screen Sasses: # screen_with_pie.sass =pie behavior: url(/stylesheets/lib/PIE.htc) position: relative @import base.sass # screen.sass =pie // No pie for you @import base.sass
Puma allows you to specify the max and min threads. In development this could be useful if you use a...