Productivity Sauce

Dmitri Popov
Dig up Photos Buried in Emails with Lost Photos Found

Mar 31, 2014 GMT

If you've been using an email account for a few years, chances are it has plenty of photos buried among thousands of sent and received emails -- photos that you might not even remember are there. It's not unthinkable that at some point, you'd want to pull all the photos languishing up in the cloud to your machine. And when this day comes, you'll need the Lost Photos Found script which automatically sieves through messages on an IMAP email account and downloads all found photos and images.To make use of this nifty script, clone the project's GitHub repository using the git clone https://github.com/caio1982/Lost-Photos-Found.git command. Next, install the required packages by running the...
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...
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...
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News