Skip to content

piotrgiedziun/dotfiles

Repository files navigation

#Peter's dotfiles This is a collection of dotfiles customised for my own usage.
Based on Roderik's dotfiles and Matt's dotfiles

##List of aliases/functions

Navigation
AliasMethodDescription
cdf(fuction) cd to path indicated by Finder.app instance
tab(fuction) create new iTerm tab with current dir and virtualenv
splittab(fuction) splits tab with current dir and virtualenv. Options v - vertical, h - horizontal
..cd .. cd up
...cd ../.. cd 2 x up
~cd ~ cd to home directory
-cd - cd to previously visted folder
cddcd ~/Downloads
cdpcd ~/Projects
cdwcd ~/Work
Opening files
AliasMethodDescription
oopen
o.open .
Listing
AliasMethodDescription
llls -l
lals -la
lsdls -l | grep "^d"
Network
AliasMethodDescription
serverfunctionhost python SimpleHTTPServer in current directory. Port might be given as parm (port)
ipdig +short myip.opendns.com @resolver1.opendns.comreturn ip
localipipconfig getifaddr en1 return local ip
whoiswhois -h whois-servers.net
flushdscacheutil -flushcache && killall -HUP mDNSResponderflush DNS
sniffsudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'sniff HTTP
httpdumpsudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"
jsonfunctionSyntax-highlight JSON strings or files
GET|POST|PUT|DELETE [url]lwp-request -m '[METHOD]' send GET/POST/PUT/DELETE request
Others
AliasUsageDescription
killpkillp 8080kill all processes working on port 8080
mkdmkd iLikePizzamake dir and cd to it
copycopy cat ~/.ssh/id_rsa.pubcopy given content to clipboard
dataurldataurl image.pngreturn base64 of given object
updateupdateupdate gem, brew, system etc.
lscleanuplscleanup clean up given dir
cleanupcleanupclean up current dir
emptytrashemptytrash clean trash
urlencodeurlencode http://google.com encode given url
mergepdfmergepdf --output out.pdf file1.pdf file2.pdf merge PDF files
beepsleep 2 && beep notify task is done
extractextract file.zip extract given file
rollroll file.zip file.png file.jpg create zip/tar/tar.gz archive from listed files

##Directory structure

  • ~/Projects - own projects main dir
  • ~/Work - work projects main dir

##Virtualenv

  • virtualenv directory ~/.virtualenvs
  • create new virtual env - mkvirtualenv [env_name]
  • remove existing one - rmvirtualenv [env_name]
  • workon existing one - workon [env_name]

##SSH In order to have auto-complete option you have to add all yours hosts into .ssh/config file.

Example .ssh/config file:

Host github
	HostName github.com
	User piotrgiedziun
	IdentityFile ~/.ssh/id_rsa

Host example.com
	User foreveryoung
	IdentityFile ~/.ssh/foreveryoung_rsa

##Prerequisites

##Installation Open terminal and type

git clone https://github.com/piotrgiedziun/dotfiles.git && cd dotfiles && sudo ./install

# if you want to have sublime attached
ln -sf /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

About

Mac OS dotfiles for developers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published