Skip to content

Instantly share code, notes, and snippets.

View Mausy5043's full-sized avatar

Maurice (mausy5043) Hendrix Mausy5043

  • The Netherlands
  • 05:02 (UTC +02:00)
View GitHub Profile
@Mausy5043
Mausy5043 / simplemail.py
Last active February 18, 2018 10:25
A simple Python script to send email
#!/usr/bin/env python2.7
import sys
import getopt
import smtplib
import email.mime.text
import syslog
import os,time
from email.mime.text import MIMEText
@Mausy5043
Mausy5043 / archey-m.py
Last active December 25, 2017 09:17
Python system information tool
#!/usr/bin/env python
#
# Archey-m [version 0.2.8-1]
# Archey [version 0.2.8]
#
# Archey is a system information tool written in Python.
#
# Maintained by Melik Manukyan <[email protected]>
# ASCII art by Brett Bohnenkamper <[email protected]>
# Changes Jerome Launay <[email protected]>
@Mausy5043
Mausy5043 / extest.py
Created December 25, 2017 09:02
Python 3 Exception Test
#!/usr/bin/env python3
try:
raise Exception('X')
except Exception as e:
print("Error {0}".format(str(e.args[0])).encode("utf-8"))
@Mausy5043
Mausy5043 / _Ziggo.md
Last active June 5, 2017 09:58
Ziggo Internet Max (200Mbit/s) --> time wget -vS http://download.xs4all.nl/test/2GB.bin

Claim : 200Mbps (upload) / 20Mbps (download)

2017MAY05

200Mbps == 25MBps

Expected time for a 2GB file = 80 sec.

Measurements of downloadspeed by downloading a 2GB file:

| Machine | Mbps |

@Mausy5043
Mausy5043 / .bashrc
Last active June 4, 2017 11:06
Installing FreeBSD 11.0 on a VM (QEMU/KVM) running on Ubuntu 16.04 LTS
PS1=' \[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;36m\]\w \$\[\033[00m\] '
@Mausy5043
Mausy5043 / sysupdate.sh
Last active April 22, 2017 05:58
Update all software on a Debian based system; Raspberry Pi
#! /bin/bash
echo "..Updating"
echo "=============="
logger -p local1.info -t sysupdate Update
# sudo apt-get update
sudo apt update
echo
echo "..Listing"
@Mausy5043
Mausy5043 / buildrasp.sh
Created January 24, 2017 15:40
Script to build and install `raspbian-ua-netinst` on the Pi itself.
#!/bin/bash
CLOPT="$@" #CLI parameters will be passed to mod-ua.sh
install_package()
{
# See if packages are installed and install them.
package=$1
echo "*********************************************************"
echo "* Requesting $package"
@Mausy5043
Mausy5043 / buildrasp2.sh
Last active July 25, 2017 20:02
Script to build and install `raspberrypi-ua-netinst` on the Pi itself.
#!/bin/bash
BRANCH="devel"
# Build RASPBERRYPI-UA-NETINST using the NFS-mounted /mnt/backup/...
CLOPT="$@" #CLI parameters will be passed to mod-ua.sh
install_package()
{
@Mausy5043
Mausy5043 / hddcreate
Last active March 21, 2023 08:01
Commands used to initialise a harddisk for use on Raspberry Pi (debian)
# 1. Connect the harddrive via USB
# 2. Find out the allocated device name
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part
mmcblk0 179:0 0 3.8G 0 disk
├─mmcblk0p1 179:1 0 128M 0 part /boot
└─mmcblk0p2 179:2 0 3.6G 0 part /
@Mausy5043
Mausy5043 / gorpf
Last active December 19, 2016 17:11
Bash script to make an installed `raspbian-ua-netinst` system convert to and track the RPF kernel
#!/bin/bash
# switch to the RPF kernel
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "% THIS WILL UPDATE THE KERNEL %"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo ""
echo ""
echo ""