Skip to content

Instantly share code, notes, and snippets.

@Alloyed
Alloyed / result.sh-session
Last active August 29, 2015 14:02
memory usage
$ nodejs --version && lua -v && luajit -v
v0.10.28
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/
$ nodejs --expose-gc test.js && lua test.lua && luajit test.lua
----
nodejs
----
1804856
# Usage: Either sshcat host:file or sshcat host file
# handy as a drop-in replacement for normal cat in piped oneliners, etc.
sshcat() {
if [[ "$1" == *:* ]]; then
ssh "${1%:*}" "cat ${1##*:}";
else
ssh "$1" "cat $2";
fi
}