Tuesday, February 26, 2013

access remote django dev server from local browser


To access a remote Django development server from your local browser....

On the local host, SSH to the remote host:
$ ssh -v -L 9000:localhost:8000 <the remote address>
On the remote host, run the Django dev server:
/path/to/my/django/project$ python manage.py runserver 0.0.0.0:8000
On the local host, go to http://localhost:9000 in the browser

Or...

Using LocalForward in your ~/.ssh/config, add entry

Host myremote
  User eliot
  HostName my.remotehost.com
  LocalForward 9000 localhost:8000

Thursday, February 14, 2013

SQuirrel SQL client for Ubuntu

Provides a nice gui for accessing Microsoft SQLServer databases. (Handles MySQL also.)

Get it from here: http://www.squirrelsql.org/

Configuring it is a little tricky...use the guide here:
http://informatics.malariagen.net/2011/08/15/squirrel-sql-a-nice-database-gui-frontend-for-ubuntu/


To configure it for MySQL as well, follow similar steps after installing the mysql-jdbc driver.
sudo apt-get install libmysql-java


Monday, December 3, 2012

sshfs

I've made some effort to duplicate my work desktop Ubuntu environment on my laptop and home desktop systems. When that becomes tiresome, I use SSH from my remote systems to work on my desktop files. But that restricts me to using only the command line editors available on the Ubuntu system. But then EUREKA, SSHFS! Now I mount the work Ubuntu file system to a local drive. Let's me use Sublime and other local dev apps with the files on the mapped drive. Nice.

Monday, November 12, 2012

mysql + django on the mac is a pain

Issues with mixing 32 bit python build with 64 bit mysql build.
Switching to PostgreSQL.

Saturday, November 3, 2012

installed ack in cygwin



perl -MCPAN -e "CPAN::Shell->force(qw(install App::Ack));"

built vim from source to enable python support for cygwin

uninstalled vim ...apt-cyg remove vim
got source vim-7.3.tar.bz2 from vim.org
2 steps to unzip....install bunzip
bunzip vim-7.3.tar.bz2
tar -xvf vim-7.3.tar

installed ncurses
installed libncurses-devel .. had to be done via cygwin-setup
installed make
installed view

cd vim73
./configure --enable-pythoninterp --enable-perlinterp --enable-rubyinterp --enable-gui=no --without-x --enable-multibyte --prefix=/usr


unlink /usr/bin/view
unlink /usr/bin/rvim
unlink /usr/bin/rview
unlink /usr/bin/vimdiff


make && make install


Monday, October 22, 2012

I finally got MongoDB running in cygwin! Trying to make it work with Django....