Today I got a better understanding of how git works, in particular what git checkout and git reset do. Git basics A commit holds a certain state of a directory...
Working with a self-signed certificate is much easier, when the browser accepts it. Google Chrome Warnings from chrome might...
...accept both optional and keyword arguments is dangerous and should be avoided. This confusing behavior will be deprecated in Ruby 2.7 and removed in Ruby 3, but right now you...
end end colored_p(User.new) # ArgumentError: unknown keywords: first_name, last_name This behavior is not very smart. The easy fix is just to never mix optional and keyword...
By default, Devise sends all emails synchronously with deliver_now. To change that, Devise's readme suggests overwriting the send...
Setting array columns When using PostgreSQL array columns, you can set an array attribute to a value with square brackets...
In RubyMine folders can be excluded from search, navigation etc. by marking it as excluded. You might sometimes wish to...
simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...
...not do that and if everything was fine before, maybe just restore the previous behavior by adding environment.loaders.delete('nodeModules') to your environment.js. If you used postcss-cssnext before, add it...
If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...
People do. Whether consumers or developers, the end users of software are human beings who care about what's in the software. When the software changes, people want to...
Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...
...equal $my-great-blue instead of blue. The reason is that custom property values behave differently and allow any kind of value to be assigned (thus not being bound to...
...of a datepicker or just the english one. Most often you want to import beside the default JS defined in the package.json the styles of the library.
...be aware of its security implications. Both variants have options to change their default behaviour. Search engines and redirects If you have a public facing website that ranks on search...
...their expected input (e.g. username, email, current-password, cc-number), browsers can offer a better autocomplete experience. There's a host of possible values. Try it live! Better Mobile Inputs...
...I've seen examples using directory but there are no indications this attribute will become standard soon. Feel free to use to feel future-proof. On JavaScript file objects, webkitRelativePath...
When deploying Rails applications you might have noticed that JS and CSS are not cached by all browsers.
One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...
If you're frequently switching between projects, you might be annoyed by RubyMines behavior of opening the last project on startup. After all loading a project takes a few seconds...
...a dialog to choose the project to open. This can be set under Appearance & Behavior > System Settings > Project > Reopen projects on startup. Switching to other projects A helpful dialog for...
Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...
...Grouping-Results). But this seems not the be the whole truth. Instead the...
...syntax behaves like Go's Ellipsis expression which is used to pass a list as multiple parameters...
...to a Variadic Function. You can use this behavior for example if you want to merge a list of maps into one map: locals { list_of_maps = [ { "key1" = "value1"
...a strategy to manually enable certain origins to interchange data. Because CSRF exploits browser behavior, its mitigation CORS is also implemented by browsers. CORS procedure The CORS workflow is basically...