All of the following information is based on go version go1.14.7 darwin/amd64
.
(Bold = supported by go
out of the box, ie. without the help of a C compiler, etc.)
aix
android
# Gist is at https://gist.github.com/nerdalert/9dcb14265a3aea336f40 | |
# | |
# Macvlan/Ipvlan Manual Driver Tests | |
# -Bash script form at: https://github.com/nerdalert/dotfiles/blob/master/ipvlan-macvlan-it.sh | |
############################################################################################ | |
# Macvlan IPv4 802.1q VLAN Tagged Bridge Mode Tests | |
# | |
### Network w/o explicit mode to default to -o macvlan_mode=bridge VLAN ID:33 | |
docker network create -d macvlan \ | |
--subnet=192.168.33.0/24 \ |
cd ~/Library/Preferences/ | |
ls | grep 'jetbrains' | xargs rm | |
cd ~/Library/Application\ Support/JetBrains/PyCharm2020.1/ | |
rm eval/*.key | |
rm options/other.xml | |
cd ~/Library/Preferences | |
plutil -convert xml1 com.apple.java.util.prefs.plist | |
sed -i'' -e '/evlsprt/d' com.apple.java.util.prefs.plist | |
plutil -convert binary1 com.apple.java.util.prefs.plist |
def diskstats(): | |
file_path = '/proc/diskstats' | |
# http://lxr.osuosl.org/source/Documentation/iostats.txt | |
columns_disk = ['major_dev_num', 'minor_dev_num', 'device', 'reads', 'reads_merged', 'sectors_read', 'ms_reading', 'writes', 'writes_merged', 'sectors_written', 'ms_writing', 'current_ios', 'ms_doing_io', 'weighted_ms_doing_io'] | |
columns_partition = ['major_dev_num', 'minor_dev_num', 'device', 'reads', 'sectors_read', 'writes', 'sectors_written'] | |
result = {} | |
for line in (l for l in open(file_path, 'r').xreadlines() if l != ''): | |
parts = line.split() |
# Copyright 2015 Andrew Gunnerson <andrewgunnerson@gmail.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
#!/bin/bash | |
# bytesToHuman based on https://unix.stackexchange.com/questions/44040/a-standard-tool-to-convert-a-byte-count-into-human-kib-mib-etc-like-du-ls1/259254#259254 | |
# units from wikipedia (note I had to re-order Z and Y): | |
# - https://en.wikipedia.org/wiki/Binary_prefix | |
# - https://en.wikipedia.org/wiki/File_size | |
# - https://en.wikipedia.org/wiki/ISO/IEC_80000#Information_science_and_technology | |
# test cases from https://www.alteeve.com/w/IEC_and_SI_Size_Notations and https://en.wikipedia.org/wiki/File_size | |
# 64-bibt checks at https://superuser.com/questions/1030122/what-is-the-maximum-value-of-a-numeric-bash-shell-variable/1030129#1030129 |
function bytesToHR() | |
{ | |
local SIZE=$1 | |
local UNITS="B KiB MiB GiB TiB PiB" | |
for F in $UNITS; do | |
local UNIT=$F | |
test ${SIZE%.*} -lt 1024 && break; | |
SIZE=$(echo "$SIZE / 1024" | bc -l) | |
done |