OrangePi poor replacement for the real Raspberry Pi

I was intrigued with low price of Orange Pi PC on GearBest site and since I had a lot of unused points I decided to order one even though I did not really need it. For a few bucks you get quad core CPU, 1GB of RAM, Ethernet all the bells and whistles as Raspberry Pi for third of the price.

What could go wrong? Well it seems for this price you get what you paid for a third of quality manufacturing. As soon as I opened my box I noticed that the board is slightly bent as you can see on the picture here: Continue reading “OrangePi poor replacement for the real Raspberry Pi”

Change default editor in Debian and debian-like distributions

To check which editor is set as default in your Debian distro you can do two things:

  1. in your favorite shell press CTRL+X+CTRL+E which will launch your default editor or
  2. use command update-alternatives –list-editor to list installed editors and you can expect result similar like this one:
# update-alternatives --list editor
 /bin/nano
 /usr/bin/mcedit
 /usr/bin/vim.basic

To set for example vim.basic as your default editor you can use following command:

# update-alternatives --set editor /usr/bin/vim.basic
 update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode

Now if you again quick launch your editor with CTRL+X+CTRL+E you will notice that vim is invoked.

Useful shell shortcuts

Here are some useful shell shortcuts that you can use to make your life easier:

CTRL+A - move to beginning of line
CTRL+E - move to the end of the line
CTRL+B - move backward
CTRL+F - move forward
CTRL+D - delete character under cursor
CTRL+K - deletes text from cursor to the end of line
CTRL+X+BACKSPACE - delete text from cursor to the beginning of the line
CTRL+T - exchange character under cursor with previous character
ESC+T - exchange two words before and under cursor
ESC+U - converts text from cursor to the end of the word to UPPERCASE
ESC+L - converts text from cursor to the end of the word to LOWERCASE
CTRL+X+CTRL+E - launch default editor
CTRL+L - Clears screen above current line
CTRL+W - Delete word from cursor position to the left
CTRL+R - Search through command history