lises laptop

installed services

  • unattended-upgrade
  • rsync backup script
  • spotify testing
  • dropbox
Advertisements

to enable automatic updates install:

$ apt install unattended-upgrades

check and uncomment in the config file as needed, well documented inside the same config file /etc/apt/apt.conf.d/50unattended-upgrades:

$ cat /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
"o=Raspbian,n=jessie,l=Raspbian-Security";
};
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::InstallOnShutdown "true";
Acquire::http::Dl-Limit "300";
$ cat /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
	"o=Ubuntu,a=xenial-security";
	"o=Ubuntu,a=xenial-updates";
	"o=Ubuntu,a=xenial";
	"o=Canonical,a=xenial";
	"o=linuxmint,n=serena";
};
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::InstallOnShutdown "true";
Acquire::http::Dl-Limit "300";

edit the config file:

$ vim /etc/apt/apt.conf.d/10periodic
# update the package list
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";

# once a day
APT::Periodic::Unattended-Upgrade "1";

check if its working:

$ sudo unattended-upgrades --dry-run
$ tail /var/log/unattended-upgrades/unattended-upgrades.log

sources:

https://community.linuxmint.com/tutorial/view/1217

http://www.faqforge.com/linux/how-to-enable-auto-updates-in-ubuntu/

custom python3.x install (on mint)

follow instructions from: http://grahamwideman.wikispaces.com/Python-+Installation+on+Linux

note the following:

  • use (latest) python version that you want
  • use configure prefix path valid for your version
  • make install for adding binaries to /bin (adding to $PATH variable) and make altinstall for side-by-side install
  • create link:
    ln -s /opt/python3.5/bin/python3.5 /usr/local/bin/python3.5
  • need to compile libraries as well… to be continued

bash extract function

it’s convenient to define this function in your bashrc, s.t. you dont have to think of all the different file formats while extracting.

source: https://coderwall.com/p/agmblq/bash-function-for-extract-every-archive-with-one-word


function extract()
{
     if [ -f $1 ] ; then
         case $1 in
            *.tar.bz2)   
                tar xvjf $1     
                ;; 
            *.tar.xz)
                tar xvJf $1
                ;;
            *.tar.gz)    
                tar xvzf $1     
                ;;
            *.bz2)       
                bunzip2 $1      
                ;;
            *.rar)
                unrar x $1      
                ;;
            *.gz)
                gunzip $1       
                ;;
            *.tar)
                tar xvf $1      
                ;;
            *.tbz2)
                tar xvjf $1     
                ;;
            *.tgz)
                tar xvzf $1     
                ;;
            *.zip)
                unzip $1        
                ;;
            *.Z)
                uncompress $1   
                ;;
            *.7z)
                7z x $1         
                ;;
            *)  
                echo "'$1' cannot be extracted via extract" 
                ;;
        esac
    else
        echo "'$1' is not a valid file"
    fi
}