Tuesday, May 26, 2015

Notes from a lecture I gave "From windows to terminal"





Here are notes from my  lecture "From windows to terminal" about using the linux command line.


Run windows programs in Linux\Mac
notepad++
beyond compare
total commander

Fiddler for mac - Mono - Fiddler
or
Charles proxy 


TERMINAL

brew
to install/update a program that you dont have localy type:
brew install {program name}

cmatrix
cmatrix -sb



basic commands


ll, cat ,  grep , | - pipe
find . -name "*Fiddler*"
sudo


locate  (find files)
to update the locate db run
sudo -S /usr/libexec/locate.updatedb &



the Z script (jump to any directory)


hg (shortcut to find any previously run command)
put in your .profile file
alias hg='history|grep'


ADVANCED
~  // alias ~='cd /Users/dovamir'

say -f poem.txt &

kill  {jobid}
killall say
iterm2



show jobs ids
go back in time
split screen
tabs
cmd click a file to open it in a custom editor
background image!



NETWORK

node node.js   // run a node server with the following file
➜  tmp  cat node.js
var http = require("http");


http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World!");
  response.end();
}).listen(8888);


python file server
python -m SimpleHTTPServer 8000
     // makes current directory files available in localhost:8000

sshpass - login to ssh without typing password
sshpass -p "yourpassword" ssh root@il-604release.eng.jiveland.com
ncat
ncat -l  4444 < in.log    // expose the file in.log  in port 4444
ncat soa-test-svc1-1.phx1.jivehosted.com 4444 > out.log    // put the file in.log from the remote server in out.log

GIT

git prompt  



git lg    


Gource

No comments:

Post a Comment