Saturday 28 April 2012

Creating a Python App on Heroku

Need a requirements file containing all items plus:

distribute
gunicorn==0.13.4

Plus a Procfile:
web: gunicorn app:app -b 0.0.0.0:$PORT -w 3

Then you just go:
heroku login
heroku create --stack cedar
git push heroku master
heroku ps:scale web=1

Saturday 31 March 2012

Windows Command Line History in CMD.EXE

I just found out about these!



  • F1: Pastes the last executed command (character by character)
  • F2: Pastes the last executed command (up to the entered character)
  • F3: Pastes the last executed command
  • F4: Deletes current prompt text up to the entered character
  • F5: Pastes recently executed commands (does not cycle)
  • F6: Pastes ^Z to the prompt
  • F7: Displays a selectable list of previously executed commands
  • F8: Pastes recently executed commands (cycles)
  • F9: Asks for the number of the command from the F7 list to paste

Installing Python nicely on Windows box

At the time of writing despite x64 Windows use Python 2.7 (not 3.0) and x86 (not x64).
The Windows virtualenv wrapper notes are here: https://github.com/davidmarble/virtualenvwrapper-win

At this point ready to use VirtualEnv, along with requirements files etc. I suppose the process might look something like this:

  • make project folder new_proj
  • cd into new_proj
  • make requirements.txt
  • edit requirements.txt add say "flask"
  • mkvirtualenv new_proj_env
  • pip install -r requirements.txt
Additionally the postgres database driver might be required. This is in combination with a local installation of Postgres.

Friday 28 October 2011

Network settings from Run box in Windows 7

On XP and Server 2003 it was only a few clicks, Start > Network Connections, to get at the config screens for IP/DNS/DHCP etc.

In Windows 7 its hidden a million layers down behind all kind of user friendly fluff.

Luckily you can simply type this into the search box (the Windows 7 version of the Run box...):

ncpa.cpl

Much better!

Thursday 22 September 2011

Avoid Sharepoint Authentication Popup

One of the most galling things about Sharepoint in the configuration we have at my place of work is that you end up retyping your credentials all the time.

I've previously posted some ways around this by editing security settings in IE to ensure your AD credentials are always posted through.

However I've found a much better solution! Use Google Chrome. Type in your credentials and the experience is seamless.

Cannot pin Netsupport Manager to taskbar in Windows 7

I access some Windows Server boxes via Netsupport Manager at work. I'd like to pin this app to the taskbar, but as it has the word "Support" in the title Microsoft have explicitly excluded this.

I would have enjoyed attending the product management meeting at Microsoft where the decision to exclude any apps with "Support" in the name was made. I hope they had tea and nice biscuits!

To lift this slightly baffling restriction, you can amend the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames


It will probably look like this:

SETUP.EXE;INSTALL.EXE;ISUNINST.EXE;UNWISE.EXE;UNWISE32.EXE;ST5UNST.EXE;MSOOBE.EXE;LNKSTUB.EXE;CONTROL.EXE;SUPPORT;WERFAULT.EXE;WLRMDR.EXE;GUESTMODEMSG.EXE;MSIEXEC.EXE;DFSVC.EXE;WUAPP.EXE;


Mine now looks like this:


SETUP.EXE;INSTALL.EXE;ISUNINST.EXE;UNWISE.EXE;UNWISE32.EXE;ST5UNST.EXE;MSOOBE.EXE;LNKSTUB.EXE;CONTROL.EXE;WERFAULT.EXE;WLRMDR.EXE;GUESTMODEMSG.EXE;MSIEXEC.EXE;DFSVC.EXE;WUAPP.EXE


And I can now pin NetSupport.