Productivity Sauce

Dmitri Popov
Play 2048 in the Terminal with Bash 2048

Mar 28, 2014 GMT

The 2048 game is as addictive as it is simple. Use the arrow keys to move tiles. When two tiles with the same number collide, they merge into a tile with the total value of the two collided tiles. For example, when two 32 tiles collide, they merge into a 64 tile. The purpose of the game is to reach the 2048 tile. It might sound simple, but it's far from it. Depending on your skills, a typical game takes 5-10 minutes to play, which makes it a perfect diversion for short breaks during the day. To play the original game, you need a browser and an Internet connection. But if you want to play 2048 offline from the convenience of the command line, you'll...
Butterfly: Terminal in A Browser

Mar 27, 2014 GMT

A terminal and a browser are the most important tools of any Linux user. And Butterfly allows you to combine both. This clever solution lets you use a browser as a terminal, so you don't have to constantly switch between the browser and the terminal. Butterfly is written in Python, and the utility can be deployed in a matter of minutes. Run the pip install butterfly command as root (to use pip, you need to install the python-pip package first). Launch the server using the butterfly.server.py command, and you can then access the terminal by pointing your browser to http://127.0.0.1:57575. If you want to log in to the shell as a different user, you can do so by appending its name to the...
Keep Track of Your Current Work with a Bash Function

Mar 26, 2014 GMT

Here is a clever little trick I picked from a Hacker News thread. Using a simple custom now() function, you can keep track of things you are currently working on. Add the following code to the ~/.bashrc file: now() { echo $(date "+%Y-%m-%d %H:%M:%S") - "$@" >> $HOME/.now }Save the changes, and you can then record tasks by running the now Task description command, for example: now Working on an article. This records the specified task in the ~/.now text file in the following format: 2014-03-21 15:17:13 - Working on an article. You can also use special words like pause, continue, and done to mark the task as paused, resumed and completed. The thread...
Better Syntax Highlighting in nano

Mar 25, 2014 GMT

If you find the syntax highlighting functionality in the nano text editor lacking, you will appreciate a collection of .nanorc files in the nanorc GitHub repository. Here, you'll find a selection of definition files for a broad range of programming languages: from Python and HTML, to Lua and Markdown. To add all this goodness to nano, clone the GitHub repository using the git clone https://github.com/nanorc/nanorc.git command, and then install the files by running the make install command. That's all there is to it.
git-sh: Bash Environment for Git Work

Mar 20, 2014 GMT

If you spend a lot of time running Git commands in the terminal, you might appreciate git-sh, a set of customizations that transform the Bash shell into an environment for working with Git. Installing git-sh is super easy, and it can be done using the following commands: git clone git://github.com/rtomayko/git-sh.git cd git-sh make make installNote that the last command must be run as root. To start the customized shell, run the git-sh command. Use the help command to view a list of the supported Git commands. When you switch to an existing repository, git-sh conveniently shows the current branch in the prompt. git-sh essentially lets you run all key Git commands without prefixing them...
Rename Multiple Files and Directories with mvdir

Mar 19, 2014 GMT

Here is a problem: you need to give a bunch of DSC_xxx.JPG files meaningful names like Berlin_May_1981.JPG, Tokyo_Trip_1973.JPG, and so on. The mvdir Bash shell script dramatically simplifies this otherwise tedious task. The script scans the specified path and opens a list of all found files and directories in a default text editor. Edit then the names, and the script automatically renames the modified files and directories when you close the editor.To install the script on your system, create a new file in a text editor, paste the code in the file, and save under the mvdir name in the /usr/local/bin directory. Make then the script executable using the chmod +x ~/usr/local/bin/mvdir...
Scrub DRM off Kindle Ebooks with Calibre

Feb 27, 2014 GMT

DRM is a nuisance, no doubt about that. After all, you should be able to use whatever ebook reader application you want to read the ebooks you've bought. If you happen to own a Kindle device, you'll be pleased to learn that removing DRM from Kindle ebooks you legally purchased is a relatively straightforward affair courtesy of the mighty Calibre ebook suite. First step is to install the DeDRM plugin in Calibre. To do this, grab the latest version of the DRM Removal Tools for eBooks, and unpack the downloaded archive. Launch Calibre, press the DeDRM_plugin.zip button in the main toolbar, and choose Change Calibre behavior. Switch to the Advanced | Plugins...

Issue 166/2014

Buy this issue as a PDF

Digital Issue: Price $9.99
(incl. VAT)

News