________          ___       __   ________  ________  ___  __            ___  ________           ________  ________  ________  ________  ________  _______   ________   ________      
|\   __  \        |\  \     |\  \|\   __  \|\   __  \|\  \|\  \         |\  \|\   ___  \        |\   __  \|\   __  \|\   __  \|\   ____\|\   __  \|\  ___ \ |\   ____\ |\   ____\     
\ \  \|\  \       \ \  \    \ \  \ \  \|\  \ \  \|\  \ \  \/  /|_       \ \  \ \  \\ \  \       \ \  \|\  \ \  \|\  \ \  \|\  \ \  \___|\ \  \|\  \ \   __/|\ \  \___|_\ \  \___|_    
 \ \   __  \       \ \  \  __\ \  \ \  \\\  \ \   _  _\ \   ___  \       \ \  \ \  \\ \  \       \ \   ____\ \   _  _\ \  \\\  \ \  \  __\ \   _  _\ \  \_|/_\ \_____  \\ \_____  \   
  \ \  \ \  \       \ \  \|\__\_\  \ \  \\\  \ \  \\  \\ \  \\ \  \       \ \  \ \  \\ \  \       \ \  \___|\ \  \\  \\ \  \\\  \ \  \|\  \ \  \\  \\ \  \_|\ \|____|\  \\|____|\  \  
   \ \__\ \__\       \ \____________\ \_______\ \__\\ _\\ \__\\ \__\       \ \__\ \__\\ \__\       \ \__\    \ \__\\ _\\ \_______\ \_______\ \__\\ _\\ \_______\____\_\  \ ____\_\  \ 
    \|__|\|__|        \|____________|\|_______|\|__|\|__|\|__| \|__|        \|__|\|__| \|__|        \|__|     \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\_________\\_________\
                                                                                                                                                               \|_________\|_________|
________          ___       __   ________  ________  ___  __            ___  ________      
|\   __  \        |\  \     |\  \|\   __  \|\   __  \|\  \|\  \         |\  \|\   ___  \    
\ \  \|\  \       \ \  \    \ \  \ \  \|\  \ \  \|\  \ \  \/  /|_       \ \  \ \  \\ \  \   
 \ \   __  \       \ \  \  __\ \  \ \  \\\  \ \   _  _\ \   ___  \       \ \  \ \  \\ \  \  
  \ \  \ \  \       \ \  \|\__\_\  \ \  \\\  \ \  \\  \\ \  \\ \  \       \ \  \ \  \\ \  \ 
   \ \__\ \__\       \ \____________\ \_______\ \__\\ _\\ \__\\ \__\       \ \__\ \__\\ \__\
    \|__|\|__|        \|____________|\|_______|\|__|\|__|\|__| \|__|        \|__|\|__| \|__|
                                                                                            
                                                                                            
                                                                                            
           ________  ________  ________  ________  ________  _______   ________   ________      
          |\   __  \|\   __  \|\   __  \|\   ____\|\   __  \|\  ___ \ |\   ____\ |\   ____\     
          \ \  \|\  \ \  \|\  \ \  \|\  \ \  \___|\ \  \|\  \ \   __/|\ \  \___|_\ \  \___|_    
           \ \   ____\ \   _  _\ \  \\\  \ \  \  __\ \   _  _\ \  \_|/_\ \_____  \\ \_____  \   
            \ \  \___|\ \  \\  \\ \  \\\  \ \  \|\  \ \  \\  \\ \  \_|\ \|____|\  \\|____|\  \  
             \ \__\    \ \__\\ _\\ \_______\ \_______\ \__\\ _\\ \_______\____\_\  \ ____\_\  \ 
              \|__|     \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\_________\\_________\
                                                                         \|_________\|_________|

Open In File Browser for Linux

On windows when right clicking in the file browser pane you can select Open in file browser to open the current folder in windows explorer. On linux you will simply get an error message stating that this action is not supported on this operating system (as of MATLAB 2016a).


Quickly changing projects in MATLAB

When working on several different projects in MATLAB changing from one project folder to another can be a hassle. Some projects are in a shared dropbox folders, others are in my main MATLAB directory. Most powerful text editors offer a way of quickly changing project directories without having to navigate the folder structure by hand.


Quick Tip: Receive a pushbullet notification when a ssh login is successful

Pushbullet is a service that allows you to push notifications to your devices. We will be using it to send us a notification any-time somebody successfully connects to our server with ssh.

The cleanest way to run a script when on ssh logins is through PAM. PAM or "Pluggable Authentication Module" is a library called by all the authentication related functions in Linux that provides a way to hook into the authentication process.


Exporting MATLAB figures to LaTeX

The standard way of exporting figures from MATLAB to LaTeX is to use the builtin print command to export the figure to an eps file using:

print -depsc $filename

Unfortunately figures exported this way generally do not look like the original MATLAB figures. The aspect ratio is different and the fonts are too small. This can be overcome by tweaking the paper size, the font size and the line thickness but the process is fiddly and resulting eps files are hard to use since alternative TeX compilers like XeTeX and LuaTeX do not support eps files out of the box.