scroll-behavior: smooth;
How to fix it?
$enable-smooth-scroll: false;
html {
scroll-behavior: auto !important;
}
html[data-environment="test"] {
scroll-behavior: auto !important;
}
%html{"data-environment": "#{Rails.env}"}
scroll-behavior: smooth;
$enable-smooth-scroll: false;
html {
scroll-behavior: auto !important;
}
html[data-environment="test"] {
scroll-behavior: auto !important;
}
%html{"data-environment": "#{Rails.env}"}
This is the list of Ubuntu versions with their corresponding Kernel version:
Version / code name | Kernel |
22.04 Jammy Jellyfish | 5.15 |
21.10 Impish Indri | 5.13 |
21.04 Hirsute Hippo | 5.11 |
20.10 Groovy Gorilla | 5.8 |
20.04 Focal Fossa | 5.4 |
19.10 Eoan Ermine | 5.3 |
19.04 Disco Dingo | 5 |
18.10 Cosmic Cuttlefish | 4.18 |
18.04 Bionic Beaver | 4.15 |
17.10 Artful Aardvark | 4.13 |
17.04 Zesty Zapus | 4.1 |
16.10 Yakkety Yak | 4.8 |
16.04 Xenial Xerus | 4.4 |
15.10 Wily Werewolf | 4.2 |
15.04 Vivid Vervet | 3.19 |
14.10 Utopic Unicorn | 3.16 |
14.04 Trusty Tahr | 3.13 |
13.10 Saucy Salamander | 3.11 |
13.04 Raring Ringtail | 3.8 |
12.10 Quantal Quetzal | 3.5 |
12.04 Precise Pangolin | 3.2+ |
11.10 Oneiric Ocelot | 3.0 |
11.04 Natty Narwhal | 2.6.38 |
10.10 Maverick Meerkat | 2.6.35 |
10.04 Lucid Lynx | 2.6.32 |
09.10 Karmic Koala | 2.6.31 |
09.04 Jaunty Jackalope | 2.6.28 |
08.10 Intrepid Ibex | 2.6.27 |
08.04 Hardy Heron | 2.6.24 |
07.10 Gutsy Gibbon | 2.6.22 |
07.04 Feisty Fawn | 2.6.20 |
06.10 Edgy Eft | 2.6.17 |
06.06 Dapper Drake | 2.6.15 |
05.10 Breezy Badger | 2.6.12 |
05.04 Hoary Hedgehog | 2.6.10 |
04.10 Warty Warthog | 2.6.8 |
Sometimes, when designing queries, we assume that the database and tables inherit the same general settings. Due to this assumption, we run into many different MYSQL errors.
In this post, I will give you some tips to resolve this specific MYSQL error.
Basically, what it means is that you're trying to compare 2 fields with an incompatible collation.
For example, if you want to run this query:
SELECT* FROM table_1 WHERE A in (SELECT B FROM table_2)
But keep in mind that column A has utf8_unicode_ci as default collation, and column B has latin1_general_ci as default collation. So, if you run that query, you will get this error:
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT)
How can I make it work?
Well, it's very simple. You can use COLLATE to convert a field to the desired collation.
Example:
SELECT* FROM table_1 WHERE A in (SELECT B COLLATE utf8_unicode_ci FROM table_2)
Or
SELECT* FROM table_1 WHERE A COLLATE latin1_general_ci in (SELECT B FROM table_2)
Both queries will work fine now.
I hope you find it useful. Until the next post!!!
A few months ago I found myself in a situation where I had to run the migrations on a second server. After some research, I learned that Capistrano only runs migrations on the first server in the :db group, so other servers with :db will be ignored.
I was very surprised!!!
I kept looking into this and finally found the option I was looking for:
This is an example of the config/deploy/production.rb
server 'sample-web-server1', user: 'deploy', roles: %w{app web db}
server 'sample-web-server2', user: 'deploy', roles: %w{app web}
server 'sample-web-server3', user: 'deploy', roles: %w{app web db}
Now in your config/deploy.rb file add this option:
set :migration_servers, -> { release_roles(fetch(:migration_role)) }
Now, you just have to deploy.
As a side note:
According to the capistrano changelogs, this option was introduced from version 1.1.7, so if you have capistrano 1.1.7 onwards, you can safely use it.
You can also check the capistrano documentation here
There are some situations where your application could crash and sometimes the problem is not really in the source code, but in the database. e.g: you are using wrong collation for a specific table or column or maybe you are using wrong data type etc.
These Mysql statements can help you debug or better understand your current database structure.
Let's begin:
SHOW COLUMNS FROM users;
output:
and also you can filter by field or type etc.
SHOW COLUMNS FROM users WHERE field = 'email';
SHOW TABLE STATUS;
output:
and of course you can filter by table name:
SHOW TABLE STATUS where name = 'users';
Output:
SHOW variables;
output:
and also you filter by variable name:
SHOW variables WHERE Variable_name = 'max_allowed_packet';
SELECT TABLE_NAME AS `users`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` FROM information_schema.TABLES WHERE TABLE_NAME = "users" AND TABLE_SCHEMA = 'my_blog'
Output:
More are coming soon..
wget https://ftp.mozilla.org/pub/firefox/releases/47.0.1/linux-x86_64/en-US/firefox-47.0.1.tar.bz2
tar -xjvf firefox-47.0.1.tar.bz2
sudo rm -rf /opt/firefox*
sudo mv firefox /opt/firefox
sudo ln -sf /opt/firefox/firefox /usr/bin/firefox
git commit --amend