Create a vertical split using :vsp and horizontal with :sp.
By default, they duplicate the current buffer. This command also takes a filename:
:vsp ~/.vimrc
You can specify the new split height by prefixing with a number:
Motion, keyboard commands and shortcuts for VI Improved
| " For vundle | |
| filetype off | |
| set nocompatible " be iMproved | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#rc() | |
| " Git tools | |
| Bundle 'tpope/vim-fugitive' | |
| " Dependency managment |
I’ve recently received this error when using UTF8MB4 with Rails.
Mysql2::Error: Specified key was too long; max key length is 767 bytes
After finding this issue on the Rails GitHub page, this is the fix:
Create a file called config/initializers/mysql.rb and copy the following into it
ESLint requires a few additional configurations to be set up optimally for use with Next JS.
To start off with, install eslint, eslint-plugin-react,
npm i --save-dev eslint eslint-plugin-react
Next, create a .eslintrc file using the following:
eslint --init
| --- | |
| METHOD 1 | |
| This should roughly sort the items on distance in MySQL, and should work in SQLite. | |
| If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance. | |
| --- | |
| SELECT * | |
| FROM table | |
| ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC |