Skip to content

Instantly share code, notes, and snippets.

@TeaPackCZ
TeaPackCZ / cdm_fio.sh
Last active April 13, 2020 14:24 — forked from i3v/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
#
# Added parsing via jq
@TeaPackCZ
TeaPackCZ / pine64-battery.sh
Last active April 18, 2017 21:13 — forked from pfeerick/pine64-battery.sh
Colourful Battery Status script for Pine64 SOC board
#!/bin/bash
SWITCH="\033["
NORMAL="${SWITCH}0m"
RED="${SWITCH}1;31m"
GREEN="${SWITCH}1;32m"
YELLOW="${SWITCH}1;33m"
PURPLE="${SWITCH}1;35m"
BLUE="${SWITCH}1;34m"
CYAN="${SWITCH}1;36m"