Andy James Davies

 
Andy Davies is a Software Development Engineer for Skype in London. He's a fan of clean code and building great stuff.

Pimping the windows command line for a Mac User

For a few reasons I have recently switched over to using a windows machine for my development at work. One of the biggest issues with doing this was getting used to the windows command line. Having been a Mac / Linux user for quite a few years now it’s second nature to me to type commands such as ‘ls’ etc..

The biggest issue I have found is automatically wanting to use GNU commands within my command line. Luckily this is a pretty easy thing to rectify using something called CoreUtils. All you need to do is download CoreUtils and install it. Once you have installed it you will need to add it to your Path variables.

To add something to your path variables do:

  1. ‘Windows Key+R’
  2. Type ‘sysdm.cpl’ and click run
  3. Go to the Advanced Tab and click ‘Environmental Variables’
  4. Scroll down to ‘Path’ and click ‘Edit’
  5. Add the following to the end of the ‘Variable Value’: ;C:\Program Files\GnuWin32\bin (you may need to change this path if it installed somewhere else)

You’re done! Now you should be able to open up command prompt and run things such as ls, pwd, etc…

One of the other issues I have with the Windows command prompt is lack of ability to have different tabs open and to be able to copy / paste from the command line, for this you can download a program called Console2. Once downloaded you’ll be able to do things such as change to a nicer font, and change hotkeys in the settings menu, I changed the copy and paste hotkeys to ctrl+c / ctrl+v

So there you have it, a couple of simple steps in order to make life easier for you when working with the command line in a windows environment.

Posted in General | Comments Off

Simple HTTP server on Mac OS X in seconds…

Came across this great tip the other day. If your project is just html, css & javascript and you don’t want to bother faffing around with apache configs. On Mac OS X you can run the following 2 commands:


> cd /path/to/project/folder
> python -m SimpleHTTPServer 8080

The beauty of this is that all macs come with python already installed. So it’s just up and running, no hassel, you can then hit http://localhost:8080 to see the site. Of course you can change the port number to something other than 8080.

More can be read about this at http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python

It literally took you longer to read all that than it will to get this going.

Posted in Javascript | 5 Comments
my profile image

My Social Activity:

twitter flickr flickr lastfm reddit digg google+