Skip to content

Instantly share code, notes, and snippets.

View matthiasroos's full-sized avatar

Matthias Roos matthiasroos

  • Vodafone Germany
  • Munich
View GitHub Profile
@matthiasroos
matthiasroos / getAPTHistory.sh
Created July 26, 2019 20:28
Get command history for APT package manager
#!/bin/bash
workdir=`pwd`
mkdir /tmp/apthistory
cd /tmp/apthistory
cp /var/log/apt/history.log* .
gunzip history.log.*.gz
nr=`ls | wc -l`
list=""
@matthiasroos
matthiasroos / Jenkins_on_RaspberryPi.rst
Last active March 21, 2024 08:49
Install Jenkins on Raspberry Pi

Install Jenkins on Raspberry Pi

  1. Update the APT packages lists

    sudo apt-get update
  2. Install the Oracle Java SDK

Installing Python 3.7.6 on Raspbian Stretch

As of January 2020, Raspbian Stretch does not yet include any Python release newer than Python 3.5.x. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
@matthiasroos
matthiasroos / parse_history.log.py
Last active April 25, 2020 19:21 — forked from bmaupin/gist:1b59abbf30406ed1eb82
Parse installed packages from /var/log/apt/history.log
#!/usr/bin/python3
import re
import sys
fileAPTHISTORY = sys.argv[1]
INSTALL_STRING = ('Install: ', 'Upgrade: ')
REMOVE_STRING = ('Remove: ', 'Purge: ')
pattern = re.compile('([a-z0-9-.+]+?):[a-z0-9]+? \(.+?\),?')