Skip to content

Instantly share code, notes, and snippets.

View leonlaser's full-sized avatar
🍪

Leon Dietsch leonlaser

🍪
View GitHub Profile
@leonlaser
leonlaser / ssh_forward_port
Last active March 26, 2019 10:32
[Forward remote port via ssh to localhost] #ssh #portforwarding #network #bash
#!/bin/bash
set -o errexit
# use -f to run in background
ssh $user@$host -NL $localport:localhost:$remoteport
echo "Forwarding ${host}:${remoteport} to localhost:${localpost}. (Press ctrl+c to stop)"
@leonlaser
leonlaser / ansible_install_python
Last active March 18, 2019 10:59
[Install python via ansible] #ansible #python #remote
#!/bin/bash
ansible ${target:-"*"} -m raw -a "apt-get install python-apt -y"