Enroll macOS Beta Seed without profile installation
$ sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil
usage: seedutil enroll SEED_PROGRAM
seedutil unenroll
seedutil current
Minified, 411 Bytes, with umlauts | |
Run with `php -d display_errors=Off` to hide DEPRECATED errors on 5.3 | |
See OO-Version at <https://gist.github.com/750787> | |
<?function n($n,$a=0){$e=array(2=>'zwan','dreißig')+$d=split(':',':ein:zwei:drei:vier:fünf:sech:sieb:acht:neun:zehn:elf:zwölf');$t=$n%10;return$n<1000?($n<100?($n<20?($n<13?($d[$n].(($n-7)?(($n-1||$a)&&$n-6?'':'s'):'en')):$d[$t].'zehn'):n($t,1).($t?'und':'').$e[$n/10].(ceil($n/10)-4?'zig':'')):n((int)($n/100),1).'hundert'.n($n%100)):n((int)($n/1000),1).'tausend'.n($n%1000);}while($i<10000)echo n(++$i),"\n"; | |
# verbose (some slight changes for readability) | |
function n($n, $prefix=0) | |
{ |
#!/bin/bash | |
source .bashrc | |
loadavg=$(cat /proc/loadavg | awk '{print $2}' | sed 's/[^0-9]*//g') | |
cpucount=$(sed -n '/ cores/ s/[^0-9]//gp' /proc/cpuinfo | sed '1,1d') | |
cpu=$(($loadavg/$cpucount)) | |
memtotal=$(sed -n '/^MemTotal:/ s/[^0-9]//gp' /proc/meminfo) | |
memavail=$(sed -n '/^MemAvailable:/ s/[^0-9]//gp' /proc/meminfo) | |
mem=$(((($memtotal-$memavail))/($memtotal/100))) |
API_TOKEN=abcdefg1234hijklmno567890pqrstuv | |
API_USER=vutsrqp098765onmlkjih4321gfedcba | |
if [ -n "$SSH_CLIENT" ]; then | |
USER_IP=`echo $SSH_CLIENT|awk '{print $1}'` | |
TITLE="SSH: ${USER}@$(hostname -f) (${USER_IP})" | |
TEXT="$(date)" | |
curl -s \ | |
-F "token=$API_TOKEN" \ | |
-F "user=$API_USER" \ | |
-F "title=$TITLE" \ |
#clear bash history including entries in memory | |
cat /dev/null > ~/.bash_history && history -c && exit | |
history -c && history -w | |
# rpm show space used by packages | |
rpm -qa --queryformat '%10{size} - %-25{name} \t %{version}\n' | sort -n |