diff --git a/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md new file mode 100644 index 0000000000..f7836709c5 --- /dev/null +++ b/sources/news/20141115 LibreOffice 4.3.4 Released With 60 Bug Fixes v4.4 Shaping Up Nicely.md @@ -0,0 +1,57 @@ +LibreOffice 4.3.4 Released With 60 Bug Fixes, v4.4 Shaping Up Nicely +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2010/12/libreoffice.png) + +**Two weeks on [from the last][1], The Document Foundation is back with yet another minor release of its open-source LibreOffice productivity suite.** + +LibreOffice 4.3.4, the fourth such minor release in the ‘fresh’ series, is composed solely of bug fixes, which is par for the course in these point releases. + +Adding to the sense of deja vu is the number of bugs the foundation say have been caught in the developers’ butterfly net: around 60 or so. + +- Sorting behaviour now defaults to old style again (Calc) +- Restore focus window after preview (Impress) +- Chart wizard dialog no longer ‘cut off’ +- Word count with recorded changes fixed (Writer) +- Various RTF fixes, including image border import (Writer) + +A full list of changes can be [found on the LibreOffice Wiki page][2]. + +### Download ### + +Many folks have the whole LibreOffice schaboodle installed but rarely ever use it. If you count yourself among them, you could hold off on this release and never notice. + +If you do fancy upgrading you can find all of the relevant download links on the official project website. + +- [Download LibreOffice 4.3.4][3] + +### Looking Ahead to LibreOffice 4.4 ### + +![Info bar coming in LibreOffice 4.4](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/libreoffice-infobar.jpg) + +Info bar coming in LibreOffice 4.4 + +LibreOffice 4.4 should be a little more promising. + +[A wiki page details][4] the ongoing GUI tweaks in progress, with a new color picker, restyled paragraph line-spacing selector and an info bar to denote ‘read only’ mode among the many, many highlights. + +While the sum of these won’t amount to the huge wholesale interface changes I know the desktop community clamours for, they are sure-footed steps in the right direction. + +It’s also salient to remember that LibreOffice is a staple — in some cases integral — software for businesses and institutions. Any dramatic overhaul in look or layout would have a big knock on effect. + +Thanks Tim W! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/libreoffice-4-3-4-arrives-bundle-bug-fixes + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2014/10/libreoffice-4-3-3-released-62-bug-fixes +[2]:https://wiki.documentfoundation.org/Releases/4.3.4/RC1 +[3]:http://www.libreoffice.org/download/libreoffice-fresh/ +[4]:https://wiki.documentfoundation.org/ReleaseNotes/4.4#GUI \ No newline at end of file diff --git a/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md new file mode 100644 index 0000000000..1a85d13f45 --- /dev/null +++ b/sources/tech/20141115 How to perform system backup with backup-manager on Linux.md @@ -0,0 +1,155 @@ +How to perform system backup with backup-manager on Linux +================================================================================ +One thing that we all may have had the chance to learn in either easy or hard ways is that the importance of backups can never be underestimated. Considering that there are as many backup methods as the number of fish in the sea, you may wonder how you can effectively choose the right tool and strategy for your system. + +In this article I will introduce you to [backup-manager][1], a simple yet handy command-line backup tool which is available in the standard repositories of most Linux distributions. + +What makes backup-manager stand out among other backup tools or strategies? Let me mention just a few of its distinguishing features: + + +- **Simple design and management**: configuration file is easy to read and edit, even for beginners. +- **Set and forget**: can be scheduled to run through cron on a periodic basis. +- **Multi-protocol support for remote backup**: integrates seamlessly with various transfer protocols, applications and cloud backend (e.g., FTP, SCP, SSH-GPG, rsync, AWS S3) to transfer generated archives to a list of remote hosts. +- **Database backup support**: includes out-of-the-box support for backing up MySQL/MariaDB and PostgreSQL databases. +- **Encryption support**: supports GPG-based file encryption during backup. + +### Installing Backup-Manager on Linux ### + +Installation of backup-manager is quick and effortless since it is included in the base repositories of most Linux distributions. + +#### Debian, Ubuntu and their derivatives #### + + # aptitude install backup-manager + +During the installation process on Debian-based systems, you will be prompted to enter the directory where you want to store generated backup archives. If the chosen directory does not exist, it will be created automatically when you run backup-manager for the first time. + +Select OK and press ENTER. + +![](https://farm6.staticflickr.com/5614/15600105060_8cf4491e3b_z.jpg) + +In the next step, you will be asked to enter all the directories (separated by space) that you want to be backed up. It is advised, though not strictly required, to list several sub-directories of the same parent directory instead of entering only the parent directory. + +You can skip this step and configure the list of directories later using the variable BM_TARBALL_DIRECTORIES in the configuration file. Otherwise, feel free to add as many directories as you wish, and then choose OK: + +![](https://farm6.staticflickr.com/5610/15761238616_c9651fea1c_z.jpg) + +#### Fedora or CentOS/RHEL #### + + # yum install backup-manager + +On CentOS/RHEL, you will need to enable [EPEL repository][2] first before running the above yum command. + +### Configuring Backup-Manager ### + +The main configuration file for backup-manager is /etc/backup-manager.conf. This file is divided into sections where the backup methods and their associated variables (or "keys") are defined, making backup-manager a versatile tool that can be used in a wide variety of cases. + +For demonstration purposes, we will consider the following scenario: + +- Perform a full system backup of the /etc, /home, and /var/log directories on a weekly basis (we will set up the frequency later through cron). +- Transfer generated .tar.gz backup archives to a specific target directory in two different hosts, dev1 and dev3, over SSH. +- Back up a local MySQL database to the same destination hosts over SSH. + +Open /etc/backup-manager.conf with your favorite text editor and edit the following variables. Feel free to disregard the lines beginning with # if you want. They are provided only as explanatory comments in this article: + + # Specify the backup method(s) that will be used. + # tarball: takes a list of directories and builds the corresponding tarballs. + # mysql: archives MySQL databases using mysqldump. To restore the database, you # need to use the same tool manually. + export BM_ARCHIVE_METHOD="tarball mysql" + + # Where to store the backups. + export BM_REPOSITORY_ROOT="/var/archives" + + # The following directive indicates backup-manager to name + # the generated files after the directory that was backed up. + export BM_TARBALL_NAMEFORMAT="long" + + # Define the compression type for the generated files. + export BM_TARBALL_FILETYPE="tar.gz" + + # List the directories that you want to backup. + export BM_TARBALL_DIRECTORIES="/etc /home /var/log" + + # Exclude some subdirectories or file extensions. + export BM_TARBALL_BLACKLIST="/var/log/myotherapp.log *.mp3 *.mp4" + + # List the database(s) that you want to backup, separated by spaces. + export BM_MYSQL_DATABASES="mysql mybase wordpress dotclear phpbb2" + + # MySQL username. + export BM_MYSQL_ADMINLOGIN="root" + + # MySQL password for username. + export BM_MYSQL_ADMINPASS="mypassword" + + # Add support for DROP statements (optional). + export BM_MYSQL_SAFEDUMPS="true" + + # The hostname or IP address where the database(s) reside. + export BM_MYSQL_HOST="localhost" + + # Port where MySQL server is listening. + export BM_MYSQL_PORT="3306" + + # Compression type (optional). + export BM_MYSQL_FILETYPE="gzip" + + # Do not archive remote hosts, but only localhost. + BM_TARBALL_OVER_SSH="false" + + # User account for SSH upload. + export BM_UPLOAD_SSH_USER="root" + + # Absolute path of the user's private key for passwordless SSH login. + export BM_UPLOAD_SSH_KEY="/root/.ssh/id_rsa" + + # Remote hosts (make sure you have exported your public key to them): + export BM_UPLOAD_SSH_HOSTS="dev1 dev3" + + # Remote destination for uploading backups. If it doesn't exist, + # this directory will be created automatically the first time + # backup-manager runs. + export BM_UPLOAD_SSH_DESTINATION="/var/archives/backups/$HOSTNAME" + +### Running Backup-Manager ### + +To run backup-manager manually, type the following command. Optionally, you can add the '-v' flag in order to examine the process step by step, in a verbose way. + + # backup-manager + +The directories listed in BM_TARBALL_DIRECTORIES will be backed up in BM_REPOSITORY_ROOT as tarballs, and then transferred over SSH to hosts dev1 and dev3 specified in BM_UPLOAD_SSH_DESTINATION. + +![](https://farm8.staticflickr.com/7497/15761238646_945620d8b7_z.jpg) + +As can be seen in the above image, backup-manager during runtime creates a file named /root/.backup-manager_my.cnf with the MySQL password provided in BM_MYSQL_ ADMINPASS. That way, mysqldump can authenticate to a MySQL server without having to accept login password through the command line in plain-text format, which poses a security risk. + +### Running Backup-Manager through Cron ### + +Once you have decided what is the best day of the week (and the best time) to perform your weekly backup, you can have cron run backup-manager for you. + +Open root's crontab file (note that you must be logged on as root): + + # crontab -e + +Assuming that you want to run backup-manager on Sunday at 5:15 am, add the following line. + + 15 05 * * 0 /usr/sbin/backup-manager > /dev/null 2>&1 + +### Summary ### + +In this article we have shown how backup-manager is a simple, yet powerful and easy-to-use backup tool. There are several other options that you may want to consider in your backup strategy, so feel free to refer to the man page or to the user guide, which also contains several implementation examples and advice. + +Hope it helps. Feel free to leave your questions and comments below. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/linux-backup-manager.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://github.com/sukria/Backup-Manager +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20141115 What are some obscure but useful Vim commands.md b/sources/tech/20141115 What are some obscure but useful Vim commands.md new file mode 100644 index 0000000000..24470b3121 --- /dev/null +++ b/sources/tech/20141115 What are some obscure but useful Vim commands.md @@ -0,0 +1,212 @@ +What are some obscure but useful Vim commands +================================================================================ +If my [latest post on the topic][1] did not tip you off, I am a Vim fan. So before some of you start stoning me, let me present you a list of "obscure Vim commands." What I mean by that is: a collection of commands that you might have not encountered before, but that might be useful to you. As a second disclaimer, I do not know which commands you might know and which one you find useful. So this list really is a collection of relatively less known Vim commands, but which can still probably be useful. + +### Saving a file and exiting ### + +I am a bit ashamed of myself for that one, but I only recently learned that the command + + :x + +is equivalent to: + + :wq + +which is saving and quitting the current file. + +### Basic calculator ### + +While in insert mode, you can press Ctrl+r then type '=' followed by a simple calculation. Press ENTER, and the result will be inserted in the document. For example, try: + + Ctrl+r '=2+2' ENTER + +![](https://farm8.staticflickr.com/7486/15543918097_fbcf33ee6b.jpg) + +And 4 will be inserted in the document. + +### Finding duplicate consecutive words ### + +When you type something quickly, it happens that you write a word twice in a row. Just like this this. This kind of error can fool anyone, even when re-reading yourself. Hopefully, there is a simple regular expression to prevent this. Use the search ('/' by default) and type: + + \(\<\w\+\>\)\_s*\1 + +This should display all the duplicate words. And for maximum effect, don't forget to place: + + set hlsearch + +in your .vimrc file to highlight all search hits. + +![](https://farm8.staticflickr.com/7531/15730650082_c2764857e2.jpg) + +### Abbreviations ### + +Probably one of the most impressive tricks, you can define abbreviations in Vim, which will replace what you type with somethig else in real time. The syntax is the following: + + :ab [abbreviation] [what to replace it with] + +The generic example is: + + :ab asap as soon as possible + +Which will replace "asap" with "as soon as possible" as you write. + +### Save a file that you forgot to open as root ### + +This is maybe an all time favorite in the forums. Whenever you open a file that you do not have permission to write to (say a system configuration file for example) and make some changes, Vim will not save them with the normal command: ':w' + +Instead of redoing the changes after opening it again as root, simply run: + + :w !sudo tee % + +Which will save it as root directly. + +### Crypt your text on the go ### + +If you do not want someone to be able to read whatever is on your screen, Vim has the built in option to [ROT13][2]-encode your text with the following command: + + ggVGg? + +![](https://farm8.staticflickr.com/7487/15727174681_7773a97ea2.jpg) + +'gg' for moving the cursor to the first line of the Vim buffer, 'V' for entering visual mode, and 'G' for moving the cursor to the last line of the buffer. So 'ggVG' will make the visual mode cover the entire buffer. Finally 'g?' applies ROT13 encoding to the selected region. + +Notice that this should be mapped to a key for maximum efficiency. It also works best with alphabetical characters. And to undo it, the best is simply to use the undo command: 'u' + +### Auto-completion ### + +Another one to be ashamed of, but I see a lot of people around me not knowing it. Vim has by default an auto-completion features. Yes it is very basic, and can be enhanced by plugins, but it can still help you. The process is simple. Vim can try to guess the end of your word based on the word you wrote earlier. If you are typing the word "compiler" for the second time in the same file for example, just start typing "com" and still in insertion mode, press Ctrl+n to see Vim finish your word for you. Simple but handy. + +### Look at the diff between two files ### + +Probably a lot of you know about vimdiff command, which allows you to open Vim in split mode and compare two files with the syntax: + + $ vimdiff [file1] [file2] + +But the same result is achievable with the Vim command: + + :diffthis + +First open your initial file in Vim. Then open the second one in split mode with: + + :vsp [file2] + +Finally launch: + + :diffthis + +in the first buffer, switch buffer with Ctrl+w and type: + + :diffthis + +again. + +The two files will then be highlighted with focus on their differences. + +To turn the diff off, simply use: + + :diffoff + +### Revert the document in time ### + +Vim keeps track of the changes you make to a file, and can easily revert it to what it was earlier in time. The command is quite intuitive. For example: + + :earlier 1m + +will revert the document to what it was a minute ago. + +Note that you can inverse this with the command: + + :later + +### Delete inside markers ### + +Something that I always wanted to be comfortable doing when I started using Vim: easily delete text between brackets or parenthesis. Go to the first marker and simply use the syntax: + + di[marker] + +So for example, deleting between parenthesis would be: + + di( + +once your cursor is on the first parenthesis. For brackets or quotation marks, it would be: + + di{ + +and: + + di" + +### Delete until a specific maker ### + +A bit similar to deleting inside a marker but for different purpose, the command: + + dt[marker] + +will delete everything in between your cursor and the marker (leaving it safe) if the marker is found on the same line. For example: + + dt. + +will delete the end of your sentence, leaving the '.' intact. + +### Turn Vim into a hex editor ### + +This is not my favorite trick, but some might find it interesting. You can chain Vim and the xxd utility to convert the text into hexadecimal with the command: + + :%!xxd + +![](https://farm6.staticflickr.com/5607/15109142674_e99466f2db_z.jpg) + +And similarly, you can revert this with: + + :%!xxd -r + +### Place the text under your cursor in the middle of the screen ### + +Everything is in the title. If you want to force the screen to scroll and place whatever is under your cursor in the middle, use the command: + + zz + +in visual mode. + +### Jump to previous/next position ### + +When editing a very big file, it is frequent to make changes somewhere, and jump to another place right after. If you wish to jump back simply, use: + + Ctrl+o + +to go back to where you were. + +And similarly: + + Ctrl+i + +will revert such jump back. + +### Render the current file as a web page ### + +This will generate an HTML page displaying your text, and show the code in a split screen: + + :%Tohtml + +![](https://farm8.staticflickr.com/7550/15727174701_c405f85a84_z.jpg) + +Very basic but so fancy. + +To conclude, this list was assembled after reading some various forum threads and the [Vim Tips wiki][3], which I really recommend if you want to boost your knowledge about the editor. + +If you know any Vim command that you find useful and that you think most people do not know about, feel free to share it in the comments. As said in the introduction, an "obscure but useful" command is very subjective, but sharing is always good. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-vim-commands.html + +作者:[Adrien Brochard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://xmodulo.com/turn-vim-full-fledged-ide.html +[2]:https://en.wikipedia.org/wiki/ROT13 +[3]:http://vim.wikia.com/wiki/Vim_Tips_Wiki \ No newline at end of file