Skip to content

Instantly share code, notes, and snippets.

View relthyg's full-sized avatar

Martin Güthler relthyg

View GitHub Profile
@relthyg
relthyg / Mac SSH Autocomplete
Created November 23, 2022 09:03 — forked from aliang/Mac SSH Autocomplete
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@relthyg
relthyg / -
Created January 3, 2016 12:49 — forked from anonymous/-
Restart Network Manager
#!/bin/sh
#
# Filename: /etc/pm/sleep.d/10_restart_network_manager
#
# Restarts Network Manager on resume from suspend.
# Useful if NM takes too long to find your wireless Network.
# Needs to be executable for root.
case $1 in
resume|thaw)