Skip to content

Instantly share code, notes, and snippets.

View mrublev's full-sized avatar

Michael Rublev mrublev

View GitHub Profile
@mrublev
mrublev / How to run a seconds SSHd on Mac OS X.txt
Created July 20, 2012 09:22 — forked from MacLemon/How to run a seconds SSHd on Mac OS X.txt
Instructions for an alternative port SSH server on Mac OS X (without Bonjour annoucements).
Alternative/Secondary/Backup SSH Service:
Add this line to /etc/services
ssh-alt 10022/tcp # ssh-alternative
You may change the port to any unused port you like but maybe try to avoid 2222 and 22222 as they are a little too obvious. This line actually specifies which port your alternative sshd will be listening on.
Save the launchd item following as as /Library/LaunchDaemons/ssh-alt.plist
Load with
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r