LibreOffice Calc: How to paste cells without overwriting other cells
The default behavior of Calc is that when you paste cells from the clipboard, it overwrites whatever cells occupy the same space on the spreadsheet. If you would like to insert the cells in the clipboard instead by pushing the existing cells to the bottom or the right, you can do it like this:
- Go to Edit / Paste Special
- The paste dialog has a segment Shift Cells. Choose Down or Right depending on what you want to do.
Related cards:
Invoices: How to properly round and calculate totals
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals, it actually involves a lot of rules and caveats. It is very easy to create invoices where numbers don't add up and a few cents are missing....
How to make Rational#to_s return strings without denominator 1 again
The way Rational#to_s
works on Ruby has changed from Ruby 1.9 on. Here is how to get the old behavior back.
You may want this for things where Rationals are being used, like when subtracting Date
objects from one another.
What's happening?...
Cucumber step to match table rows with Capybara
These steps are now part of Spreewald.
This note describes a Cucumber step that lets you write this:
Then I should see a table with the following rows:
| Br...
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 [...
Customize tokenization of the MySQL FULLTEXT parser
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it splits a word at period characters.
Since the tokenizer has near-zero configuration options (minimum word length and stopwords list), you n...
MySQL: How to dump single tables instead of a complete database
Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump would be to big.
mysqldump -u deploy_user -p application_production table1 table2 table2 > table1_table2_table2.sql.du...
How to find and replace empty cells in Libre Office Calc
To find and replace (CTRL + H
) empty cells in Libre Office Calc you can use a regular expressions (also called "Finds an empty paragraph"
in context of a spreadsheet):
![Screenshot_2017-12-04_11-07-04.png](https://makandracards.com/makandra/4...
PostgreSQL: How to show table sizes
When you have a large PG database, you may want to find out which tables are consuming the most disk space.
You can easily check this using the following SQL statement from the PostgreSQL wiki.
SELECT nspname || '.' || relname AS "relation",
...
How to drop all tables in PostgreSQL
To remove all tables from a database (but keep the database itself), you have two options.
Option 1: Drop the entire schema
You will need to re-create the schema and its permissions. This is usually good enough for development machines o...
PostgreSQL vs. Rails migration: How to change columns from string to integer
When writing Rails migrations to convert a string
column to an integer
you'd usually say:
change_column :table_name, :column_name, :integer
However, PostgreSQL will complain:
PG::DatatypeMismatch: ERROR: column "column_name" cannot...