Skip to content

Instantly share code, notes, and snippets.

👨‍🚀
Curious mind reading about everything

Morgan MorganGeek

👨‍🚀
Curious mind reading about everything
Block or report user

Report or block MorganGeek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MorganGeek
MorganGeek / Dockerfile
Last active Aug 14, 2019
SWI-Prolog and Logtalk on CentOS/RHEL 7
View Dockerfile
FROM centos
RUN yum groupinstall -y "Development Tools" \
&& yum -y install epel-release \
&& yum clean all
RUN yum -y install \
git \
ninja-build \
libunwind \
freetype-devel \
gmp-devel \
View favorite_commands.md

Other specific topic entries are in https://github.com/MorganGeek/bookmarks/tree/master/cheat

Top 50 commands from history with arguments

history | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50

Top 50 commands from history (binary)

history | cat | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n50

You can’t perform that action at this time.