Архив рубрики: Linux

Сайт на удалённой машине с Линуксом

По каждому этапу создания сайта нетрудно найти подробные инструкции. Но лично у меня от этих разрозненных сведений голова шла кругом — общая картина была очень смутной.

Это сообщение призвано систематизировать информацию, которую Вы уже наверняка где-то слышали. Будет описано, какие конкретно шаги были сделаны для того, чтобы появился сайт, который Вы сейчас читаете. Некоторые шаги могут быть Вам неинтересны, просто пропускайте их.

Если Вы согласны на адрес типа lisakov.github.io, то можно запустить себе блог совершенно бесплатно и очень быстро. Для этого не понадобится эта инструкция, читайте запись про установку Hexo и размещение сайта на Github’e. Читать

Gentoo + mueller + vim

Консольный словарь, англо-русская база данных и перевод по клавише в vim. Пришлось немного покопаться, чтобы найти всю эту информацию, поэтому решил собрать всё в одном месте и поделиться. Читать

Выравнивание колонок в vim

Бывает, что сталкиваешься с такой вот табличкой:

Выравнивание в vim

Есть разные утилиты для выравнивания таблиц. Но обычно можно обойтись и без них — ведь наш файл и так открыт в vim, который умеет почти всё. Процесс выравнивания можно посмотреть на gif-анимации или mp4-видео. Читать

Align columns in vim

One may come across the table like this:

There are some utilities to align the columns in the table. But do you really need one, if you are already in vim? Have a look on the alignment process in gif animation or mp4 video.
The general idea is:

Paste enough spaces between the columns, so that the leftmost element from the second column will appear to the right relatively to rightmost element from the first column. In latex files like in the video/animation, & symbol serves as a delimiter between the columns, so I use :%s/&/          &/g to precede all the ampersands with bunch of spaces. How much exactly spaces you need depends on the cell length.

Select empty column in visual block mode via Ctrl + V. To move leftwards everything to the right of the selection, use <. Repeat the action as many times as you need with .. The video and the animation show this only for the first time, when second column is being aligned. It is not the shortest way, and it is shown only for better understanding of what’s going on.

Once you’ve selected an empty column, instead of <……. or so you may do 20<. This method is used to align the remainder of the table in the video/animation.

I started to learn vim about 5 years ago, when someone told me that vim knows how to work with columns. Since then this ability of vim is one of my favorites. I love vim!

Acestream on Ubuntu 16.04

Acestream (fork of the VLC player for video playback via torrents) was easy to install using apt-get on Ubuntu 14.04, but on Ubuntu 16.04 it is not in the repositories at the moment of writing (please let me know if it changes). One way is to install Acestream from source, but it could be difficult. The second way is was described here (Spanish, the link is dead already). I decided to gather all necessary files into an archive to make installation simpler.

To find out if your computer is running 32-bit or 64-bit version of Linux type uname -a in the terminal. If the output contains i686 or i386, then your Linux is 32-bit. If the output contains x86_64, then your Linux is 64-bit.
32-bit Linux

Download the appropriate archive: Acestream 32-bit.

Install the files as follows, using dpkg or gdebi:
user ~ $user ~ $unzip acestream-32.zip
cd acestream-32
root acestream-32 #root acestream-32 #root acestream-32 #root acestream-32 #root acestream-32 #dpkg -i 00-libgnutls-deb0-28_3.3.15-5ubuntu2_i386.deb
dpkg -i 01-acestream-engine_3.0.3-0.2_i386.deb
dpkg -i 02-acestream-player-compat_3.0.2-1.1_i386.deb
dpkg -i 03-acestream-player-data_3.0.2-1.1_i386.deb
dpkg -i 04-acestream-player_3.0.2-1.1_i386.deb

64-bit Linux

Download the appropriate archive: Acestream 64-bit.

Install the files as follows, using dpkg or gdebi:
user ~ $user ~ $unzip acestream-64.zip
cd acestream-64
root acestream-64 #root acestream-64 #root acestream-64 #root acestream-64 #root acestream-64 #dpkg -i 00-libgnutls-deb0-28_3.3.15-5ubuntu2_amd64.deb
dpkg -i 01-acestream-engine_3.0.5.1-0.2_amd64.deb
dpkg -i 02-acestream-player-compat_3.0.2-1.1_amd64.deb
dpkg -i 03-acestream-player-data_3.0.2-1.1_amd64.deb
dpkg -i 04-acestream-player_3.0.2-1.1_amd64.deb

Note
If you are running into the following issue: «trying to overwrite <filename> which is also in package <packagename>», you may want to add the flag —force-overwrite to your installation command. Attention: then the mentioned file will be overwritten and mentioned programs may fail.

Acestream в Ubuntu 16.04

Программа Acestream (форк VLC) для торрент-телевидения отлично устанавливалась из репозиториев в Ubuntu 14.04, но в шестнадцатой версии её в репозиториях пока ещё нет. Установка из исходников мне так и не удалась из-за конфликтов в зависимостях, но наконец нашёл рабочий способ установки, опробованный на Linux Mint 18. Должен сработать и в Debian, наверное. Перепишу его по-нашенски. Все файлы положил в один архив для удобства. Как Acestream появится в репах — дайте знать в комментариях, запись надо будет удалить. Читать