20. August 2012

Problems with deploying Heroku Django app from Windows

Deploying Django app to Heroku from Windows machine is little bit tricky.

You can follow instructions in Heroku manual. The first problem that you may encounter is with Postgres support in Python. There is problem with this command:

pip install Django psycopg2 dj-database-url

If you do not have Visual Studio installed on your machine, you’ll receive error that vcvarsall.bat is missing.

Solution is quite easy. You don’t need to install Visaul Studio. Just download binary version of psycopg2 module from http://www.stickpeople.com/projects/python/win-psycopg/

Then you can exclude psycopg2 from pip install command, because it is installed in system directory of Python.

Another tricky issue is with command:

pip freeze >requirements.txt

If you type this command in PowerShell then it will automatically create Unicode file with extra bytes. When you try to deploy project with messed requirements.txt to Herou then you’ll see self explanatory error ;-)

TypeError: must be encoded string without NULL bytes, not str

Nice :-)

Just open requirements.txt file with notepad and select Save as. In Save as dialog choose ANSI.

Commit file and push project to Heroku. It will work ;)

19. August 2012

How to change font size in Skype on Windows 7

Update: This article is relevant only for desktop version of Skype for Windows 7.

It’s quite easy to change default font size in Skype, but option is little bit hidden.

Open menu: Tools – Options.

Click: IM & SMS

Choose: IM appearance

Click: Change Font

Change the font and Save it.

5. August 2012

Console2 for Windows – semi-transparent NodeJS shell, PowerShell or cmd

Update: I switched from Console2 to ConEmu. ConEmu is far more advanced.

Console2 is great little front-end for Windows. It makes PowerShell even more usable. It’s very flexible and you can configure console window to behave like terminal window on MacOS or Linux. It has also support for transparency. It’s simply great. No need to add any more words. Just try it.

I’d like to add few more hints.

Enable transparancy

  • Go to Settings – Appearance – More…
  • Select Window transparency – Alpha
  • Change alpha level of Active and Inacative window.

Result:

Copy on left mouse button click, paste on middle button click

Default configuration of mouse is not very useful. You have to press Shift and Left Mouse to select and copy text. Make small adjustment:

  • Settings – Hotkeys – Mouse
  • Change: Copy/clear selection to Left + Shift
  • Change: Select text to Left

Use Console2 as front-end for NodeJS

You can use Console2 to invoke also NodeJS shell. Just create Tab definition for NodeJS.

  • Go to Settings – Tabs
  • Add NodeJS and set Shell to: “C:\Program Files (x86)\nodejs\node.exe”

Create new Tab with NodeJS profile:

Awesome :)