Skip to content

Instantly share code, notes, and snippets.

View PhilippMundhenk's full-sized avatar

Philipp Mundhenk PhilippMundhenk

View GitHub Profile
#!/bin/bash
if [ -z "$1" ]; then
echo "Please supply target device"
else
echo "running test on '$1'"
numberRuns=$3
if [ -z "$numberRuns" ]; then
numberRuns=5
echo "running $numberRuns times (default)"
else
#!/bin/bash
if [ -z "$1" ]; then
echo "Please supply target device"
else
echo "running test on '$1'"
numberRuns=$3
if [ -z "$numberRuns" ]; then
numberRuns=5
echo "running $numberRuns times (default)"
else
#!/bin/bash
if [ -z "$1" ]; then
echo "Please supply target device"
else
outFile=$2
if [ -n "$outFile" ]; then
echo "logging to $2"
else
echo "no logfile supplied => /dev/null"
outFile="/dev/null"
bonnie++ -u root -n 200 -d /mnt/hdd -q >> results.csv
cat results.csv | bon_csv2html > results.html
[Unit]
Description=boot script
[Service]
#Type=forking
ExecStart=/etc/rc.local
TimeoutSec=0
RemainAfterExit=yes
[Install]
@PhilippMundhenk
PhilippMundhenk / PortableDate.vba
Last active March 7, 2017 20:34
In Excel, the date format depends on the locale setting of the computer, e.g. the formula =TEXT(TODAY(),"YYYY-MM-DD") only works correctly on computers set to English locales, and =TEXT(HEUTE(),"JJJJ-MM-TT") works on German computers. This VBA macro adds =PORTABLE_TODAY(), which fixes this problem and works on any computer.
Public Function PORTABLE_TODAY()
    Dim monthString As String
    Dim dayString As String
    Dim month As Integer
    Dim day As Integer
    
    month = Int(DatePart("m", Now()))
    day = Int(DatePart("d", Now()))
    
    If month < 10 Then