Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Start mosh-server, but first create a port redirection in the NAT
# router (with UPnP) and delete that redirection again just before
# mosh-server exits.
#
# Created: 20 Sep 2012
# Author: Bert Bos <bert@w3.org>
# original: https://www.mail-archive.com/mosh-devel@mit.edu/msg00103/mosh-server-upnp
# tweaked to reference /usr/bin/mosh-server directly
@miguelmota
miguelmota / README.md
Last active December 13, 2023 19:55
Linux sudo GUI prompt

Linux sudo GUI prompt

useful for applications that need to run scripts as root

(default ubuntu)

/usr/bin/pkexec --disable-internal-agent /bin/echo 'foo'
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n