Link: OpenVPN-Setup: Shell script to set up Raspberry Pi (TM) as an OpenVPN server

About

Shell script to set up Raspberry Pi (TM) as a VPN server using the free, open-source OpenVPN software. Includes templates of the necessary configuration files for easy editing, as well as a script for easily generating client .ovpn profiles after setting up the server. Based on the ReadWrite tutorial ‘Building A Raspberry Pi VPN’ by Lauren Orsini (see sources 1 and 2 at the bottom of this Readme).

To follow this guide, you will need to have a Raspberry Pi Model B or later (so long as it has an ethernet port), an SD or microSD card (depending on the model) with Raspbian installed, a power adapter appropriate to the power needs of your model, and an ethernet cable to connect your Pi to your router or gateway. You will also need to setup your Pi with a static IP address (see either source 3 or 4) and have your router forward port 1194 (varies by model & manufacturer; consult your router manufacturer’s documentation to do this). You should also find your Pi’s local IP address on your network and the public IP address of your network and write them down before beginning. Enabling SSH on your Pi is also highly recommended, so that you can run a very compact headless server without a monitor or keyboard and be able to access it even more conveniently (This is also covered by source 4). And last but not least, be sure to change your user password from the default.

Full documentation and download here:
OpenVPN-Setup (GitHub)
Discussion in this Reddit thread

Link: Bash One-Liners Explained, Part I: Working with files

I love being super fast in the shell so I decided to do a new article series called Bash One-Liners Explained. It’s going to be similar to my other article series – Awk One-Liners Explained, Sed One-Liners Explained, and Perl One-Liners Explained. After I’m done with this bash series, I’ll release an e-book by the same title, just as I did with awk, sed, and perl series. The e-book will be available as a pdf and in mobile formats (mobi and epub). I’ll also be releasing bash1line.txt, similar to perl1line.txt that I made for the perl series.

In this series I’ll use the best bash practices, various bash idioms and tricks. I want to illustrate how to get various tasks done with just bash built-in commands and bash programming language constructs.

Also see my other articles about working fast in bash:

Full article here:
Bash One-Liners Explained, Part I: Working with files (Browserling)

Link: Stay Focused And Boost Your Productivity With Ambient Noise Player

ANoise, or Ambient Noise, is a simple yet very convenient application developed by Costales (who’s also behind Folder Color), for playing ambient noise with a click, useful for helping you stay focused, boost your productivity or, why not, fall asleep listening to the sound of waves or rain.

Full article here:
Stay Focused And Boost Your Productivity With Ambient Noise Player (Web Upd8)

Link: DIY Time Capsule with a Raspberry Pi

As a Mac user I’ve always used Time Machine for local backups. The only issue is that it requires plugging a drive directly into your machine or buying an Apple Time Capsule. At $200 – $400 that’s not a cheap option for NAS backups.

So I set out to create my own DIY Time Capsule using a 3TB Hard Drive and a Raspberry Pi. Below are the steps I went through to get things setup.

Note: I always recommend having multiple backup sources and because this setup requires mimicking Apple protocol there is potential for data loss. Use at your own risk.

Full article here:
DIY Time Capsule with a Raspberry Pi (Caleb Woods)

Link: Time Machine for every Unix out there

rsync is one of the tools that have gradually infiltrated my day to day tool-box (aside Vim and Zsh).

Using rsync it’s very easy to mimic Mac OS X new feature called Time Machine. In this article I’ll show how to do it, but there is still a nice GUI missing – for those who like it shiny.

Full articles by Michael Jakl here:
Time Machine for every Unix out there
Followup article:
Addendum to “Time Machine for every Unix out there”

These articles are “oldie but goodies” from 2007 – if you know of a better way, leave a comment!

Link: 7 Quirky ‘ls’ Command Tricks Every Linux User Should Know

We have covered most of the things on ‘ls‘ command in last two articles of our Interview series. This article is the last part of the ‘ls command‘ series. If you have not gone through last two articles of this series you may visit the links below.

  1. 15 Basic ‘ls’ Command Examples in Linux
  2. 15 Interview Questions on Linux “ls” Command – Part 1
  3. 10 Useful ‘ls’ Command Interview Questions – Part 2

Full article here:
7 Quirky ‘ls’ Command Tricks Every Linux User Should Know (Tecmint)

Link: 4 Tools to Securely Delete Files from Linux

Any computer user with normal level skill set knows that any data removed from computer system can be recovered later with little bit of efforts. This is a good thing in the scenario when you have accidentally deleted your critical data. But in most cases, you don’t want your private data to be recovered easily. Whenever we remove anything, the operating system deletes just the index of the particular data. It means that data is still there somewhere on the disk, this method is insecure, as any smart computer hacker can use any good data recovery tool to easily recover your deleted data. Linux users utilizes the well know “rm” command to remove data from their operating system, but “rm” command works in the conventional fashion. Data removed using this command can be recovered by special file recovery tools.

Let’s see how we can safely and completely remove files/folders from our Linux system. The methods mentioned below remove data completely so it becomes very hard for recovery tools to find traces of the actual data and recover it.

Full article here:
4 Tools to Securely Delete Files from Linux (LinOxide)

Links: Bash by Example, Parts 1-3

You might wonder why you ought to learn Bash programming. Well, here are a couple of compelling reasons:

You’re already running it 
If you check, you’ll probably find that you are running bash right now. Even if you changed your default shell, bash is probably still running somewhere on your system, because it’s the standard Linux shell and is used for a variety of purposes. Because bash is already running, any additional bash scripts that you run are inherently memory-efficient because they share memory with any already-running bash processes. Why load a 500K interpreter if you already are running something that will do the job, and do it well?
You’re already using it
Not only are you already running bash, but you’re actually interacting with bash on a daily basis. It’s always there, so it makes sense to learn how to use it to its fullest potential. Doing so will make your bash experience more fun and productive. But why should you learn bash programming? Easy, because you already think in terms of running commands, CPing files, and piping and redirecting output. Shouldn’t you learn a language that allows you to use and build upon these powerful time-saving constructs you already know how to use? Command shells unlock the potential of a UNIX system, and bash is the Linux shell. It’s the high-level glue between you and the machine. Grow in your knowledge of bash, and you’ll automatically increase your productivity under Linux and UNIX — it’s that simple.

Full articles here (source: funtoo linux):
Bash by Example, Part 1 – Fundamental programming in the Bourne-again shell
Bash by Example, Part 2 – More bash programming fundamentals
Bash by Example, Part 3 – Exploring the ebuild system

Link: Crontab Generator

Those of you that use Webmin already have something very similar to this in the System > Scheduled Cron Jobs tab, but for those who aren’t using Webmin, there’s this:

If you want to periodically perform a task (e.g. sending Emails, backing up database, doing regular maintenance, etc.) at specified times and dates, there are two ways to set scheduled tasks:

  • Method 1: Use our online cron job service that will save you a headache.
  • Method 2: Use Cron available in Unix/Linux systems.

If you go with method 2, the following generator can help you produce a crontab syntax that you can copy & paste to your crontab file (You can open the file by using command crontab –e). Below the generated crontab syntax, a list of run times will be displayed too. The predictions will help you ensure that you set the time and date right.

Link to full page:
Crontab Generator