Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...
If you have a :string or :text field, you should pair it with a model validation that restricts its length...
PostgreSQL offers three character types for your columns: character varying(n) (also called varchar or just string): Contents are limited...
Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...
When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...
Code comments allow for adding human readable text right next to the code: notes for other developers, and for your...
This is a personal post-mortem analysis of a project that was mainly build to provide a REST API to...
aws ec2 describe-instances --output text --query 'Reservations[].Instances[?!not_null(Tags[?Key == `aws:autoscaling:groupName`].Value)] | [].[InstanceId]' | xargs -L1...
So I had the issue that User input (coming from many different sources and users) often contains the...
This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...
When text renders differently in Firefox and Chrome, it may be caused by a font alias that both browsers handle...
There is an issue with when restoring a PostgreSQL dump created with pg_dump < v11 with pg_restore > v10:
CSS transitions are a simple animation framework that is built right into browsers. No need for Javascript here. They're...
Edge (and some versions of Internet Explorer, like IE11) use to render a × clear input button on text fields. While...
Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...
Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...
When a user shares your content, a snippet with title, image, link and description appears in her timeline. By default...
When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...
Until Capybara 2, node finders that accept a text option were able to find nodes based on rendered text, even...
Over the years we have tried several solution to have vector icons in our applications. There are many ways to...
Was ist Elastic? Suchmaschine, basierend auf Apache Lucene größtenteils Open-Source einige kommerzielle Features ("Elastic Stack", früher "X-Pack") Zugriffsrechte...
When doing some meta-programming magic and you want to do something for all attributes of a class, you may...
In Rails, we usually have a mailer setup like this: class MyMailer < ActionMailer::Base def newsletter mail to: 'receiver@host.tld',
Here is how to make Rome datepicker look like the rest of your Bootstrap 4 application. Rome comes with very...