Switching between pythons using pyenv on OSX

Installation

From pyenv,

pyenv lets you easily switch between multiple versions of Python

As always, I recommend to use homebrew to install pyenv. Assuming that you have already installed homebrew, to install pyenv, you need

brew update
brew install pyenv

This will also create a hidden folder under your user …

more ...

Git aware prompt

I love using git via commands. And it is very often that I have to run git status or git branch to check if I am on the right branch or I am doing anything correct. Git aware prompt displays the current branch and status of the current directory.

The …

more ...

Shortcuts in OSX-Terminal

There are many useful shortcuts in OSX terminal. You may already know some of them, but I bet you don't know all of them. I am providing a cheat sheet of those keyboard shortcuts. I only list those I think are useful, more can be found here. First of all …

more ...

A simple python webserver

tags : python

The command has been changed in Python 3: python -m http.server.

Python has a very simple web server which allows you to share a particular directory with a one line command.

python -m SimpleHTTPServer 8000

Index directory can be then accessed by http://\:8000. More complicated usages …

more ...