This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## SSH Check | |
if [ -n "$SSH_CONNECTION" ] && [ "$SHLVL" == "1" ]; then | |
## pacman -S pacman-contrib | |
## https://unix.stackexchange.com/questions/119126 | |
stat_mem=$(free -m | awk 'NR==2{printf "%s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }') | |
stat_disk=$(df -h | awk '$NF=="/"{printf "%d/%dGB (%s)\n", $3,$2,$5}') | |
stat_cpu=$(top -bn1 | grep load | awk '{printf "%.2f\n", $(NF-2)}') | |
echo -e -n " Date : `date +"%A, %e %B %Y, %r"` | |
Hostname : `hostname` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Prerequirements | |
# brew install gcc (gmp libmpc mpfr isl) | |
# copy /usr/lib && /usr/include from arch linux into your CC_ROOT. | |
# /usr/local/linux/usr/include | |
# /usr/local/linux/usr/lib | |
# /usr/local/linux/usr/local/include | |
# arch linux is target enviroment for this cross compiler | |
# x86_64 binutils && gcc |
NewerOlder