OSX commands


//list ports
lsof -n -i:$PORT
ubuntu>> sudo netstat -peant | grep "LISTEN"

//Kill multiple programs
kill $(ps aux | grep 'python' | awk '{print $2}')

//scp
scp ~/localfile user@remotehst.com:/some/remote/directory 
wget resource

//see harddrive space
df

//tar
tar -cvf tgt.tar src
tar -czvf tgt.tgz src
//untar
tar xvf  <.tar file>
tar xzvf <.tar.gz file>
tar xjvf <.tar.bz2 file>

//source a conda enviorenment
source activate avery

Python



//Attaching remote debugger for python programs with Jetbrains IDEs:
import pydevd
pydevd.settrace('localhost', port=16001, stdoutToServer=True, stderrToServer=True)