Skip to content

Instantly share code, notes, and snippets.

@alexandrinos
alexandrinos / vagrant.st
Created December 27, 2015 09:37
Vagrant- login as another user from outside
#
ssh -l vagrant -i /home/glasslab/.vagrant.d/insecure_private_key 127.0.0.1 -p 2222
@alexandrinos
alexandrinos / chat.sh
Last active December 29, 2015 14:57
Netcat
#from
# https://www.youtube.com/watch?v=LQSMJtckzYI
# simple chat coomunication between 2 machines with netcat
#This works with linux, Win
# to install apt-get install netcat-traditional #buntu
#IP 192.168.33.10
nc 192.168.33.10 3137
#IP 192.168.33.11 ; so this machine is listening on the ß0rt 3137 for what 192.168.33.10 is sending, and vicevers
nc -l -p 3137
@alexandrinos
alexandrinos / tar.sh
Created December 28, 2015 13:59
Tar Command
#Linux Tar usefull commands
#-x extract -z typecompression(gz) -v verbose -f use the following tar achive
tar -xzvf tarfile.tar.gz #for tar.bz2 or bzip use -xjvf tar.bz2
#extract to specific path -C path
tar -xzvf tarfile.tar.gz -C /mypath
#extract a single file ; just add the name of the file and the path after the command
tar -xzv -f file.tar.gz "./new/abc.text"
#extract multiple files
tar -xzv -f file.tar.gz "./new/abc.text" "./new/xyz.txt"
#extract multiple files using *