Heads up: LibreOffice Calc AutoCorrect will change characters when pasting multi-line text
If you paste multiple lines of text into a cell, Calc's AutoCorrect will change the first character of the last line to uppercase:
foo => foo
bar bar
baz Baz
To fix this, go to Tools / AutoCorrect Options, choose the Options tab and uncheck every box. You're a programmer, you don't need wimpy AutoCorrect assistance.
Related cards:
Heads up: LibreOffice Calc adds quotation marks when copying data from multi-line cells
Copy data from LibreOffice Calc
When you copy data from multi-line cells in LibreOffice Calc, quotation marks are automatically added, which you may not want.
For example with license keys:
09:46:24 [...
Use -webkit-line-clamp to natively truncate long (multi-line) texts with an ellipsis
Note: You won't need this for single lines of text. In this case it is better to just use the text-overflow
property: Use CSS "text-overflow" to truncate long texts
You can use -webkit-line-clamp
in your CSS/SA...
A few hints when upgrading to Ruby 1.9
Note: If you are currently working with Ruby 1.8.7 or 1.9.3, we recommend to upgrade to Ruby 2.1 first. From our experience this upgrade is much smoother than the jump from 2.1 and 2.2, while still giving your the huge performance gains of Rub...
Simple database lock for MySQL
Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.
If you need to synchronize multiple rails...
Regular Expressions - Cheat Sheet
You can write regular expressions some different ways, e.g. /regex/
and %r{regex}
. For examples, look here.
Remember that it is always a good idea [to matc...
How to: Upgrade CarrierWave to 3.x
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic changes you need to perform and some behavior you may eventually run into when upgrading your application. This aims to save you some...
Dynamically uploading files to Rails with jQuery File Upload
Say we want …
- to create a
Gallery
that has a name andhas_many :images
, which in turn have a caption - to offer the user a single form to create a gallery with any number of images
- immediate uploads with a progress bar per image
- a snapp...
Matching line feeds with regular expressions works differently in every language
Although regular expression syntax is 99% interchangeable between languages, keep this in mind:
- By default, the dot character (
"."
) does not match a line feed (newline, line break,"\n"
) in any language. - Some languages allow you to mo...
Ruby: Making your regular expressions more readable with /x and alternative delimiters
The following two hints are taken from Github's Ruby style guide:
If your regular expression mentions a lot of forward slashes, you can use the alternative delimiters %r(...)
, %r[...]
or %r{...}
instead...
Upgrading Cucumber and Capybara to the latest versions available for Rails 2
Specify these gem versions in your Gemfile:
gem 'cucumber', '~> 1.3.0'
gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
gem 'capybara', '< 2' # capybara 2+ requires Rails 3
gem 'mime-types', '< 2' # dependeny of capybara
...