I wanted a quick reference to the new, high-level web2py functionality that was added in the T2 plugin and the T3 super-powered wiki application.
Here is what I came up with.
http://dl.getdropbox.com/u/169957/t2_t3_cheatsheet_0_9_0.pdf
Wednesday, December 31, 2008
Monday, December 29, 2008
How to setup pyodbc to connect to MSSQL from ubuntu linux
Pyodbc is a great python sql db 2.0 interface to odbc. It is a mature and well written library.
It's also a little hard to setup on linux due to all the pieces involved, but never fear, here are the steps on Ubuntu 8.04. The following will show you how to setup the dsn-less setup. This way you don't have to setup DSNs for each connection. Thanks Guillermo for the tip.
sudo aptitude install unixodbc unixodbc-dev freetds-dev tdsodbc python-dev
Change /etc/odbcinst.ini to
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so
CPTimeout =
CPReuse =
Now unixodbc and freetds are setup.
On to pyodbc itself.
Download the current version of pyodbc
Unzip the file.
Do a
sudo python setup.py install
All done.
Test it with
python
>>> import pyodbc
>>> conn = pyodbc.connect("DRIVER={FreeTDS};SERVER=dns_or_ip_of_server;UID=username;PWD=password;DATABASE=database_name")
No errors and it is installed and working!
More details here and here.
It's also a little hard to setup on linux due to all the pieces involved, but never fear, here are the steps on Ubuntu 8.04. The following will show you how to setup the dsn-less setup. This way you don't have to setup DSNs for each connection. Thanks Guillermo for the tip.
sudo aptitude install unixodbc unixodbc-dev freetds-dev tdsodbc python-dev
Change /etc/odbcinst.ini to
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so
CPTimeout =
CPReuse =
Now unixodbc and freetds are setup.
On to pyodbc itself.
Download the current version of pyodbc
Unzip the file.
Do a
sudo python setup.py install
All done.
Test it with
python
>>> import pyodbc
>>> conn = pyodbc.connect("DRIVER={FreeTDS};SERVER=dns_or_ip_of_server;UID=username;PWD=password;DATABASE=database_name")
No errors and it is installed and working!
More details here and here.
SQLite GUI Linux
Looking for a GUI for sqlite?
Want it to run on Linux? Ubuntu?
Try sqlitebrowser.
It's in the latest ubuntu repos so just run.
sudo apt-get install sqlitebrowser
Want it to run on Linux? Ubuntu?
Try sqlitebrowser.
It's in the latest ubuntu repos so just run.
sudo apt-get install sqlitebrowser
Wednesday, December 24, 2008
How to make a copy of a Table via a TSQL command in Sql Server
SELECT * INTO <newtablename> FROM <oldtablename>;
How to create a DVD/VCD/SVCD/XVCD slideshow on linux
I did this at work for some co-workers with lots of NASA pictures.
Make mpeg files that are appropriate for the standard you are using (vcd, svcd, xvcd (not recommended for compatibility with dvd players, but good quality), dvd, etc).
- Use digikam to do it.
- Tools -> Create Mpeg Slideshow
- use NTSC video type for compatibility with US DVD players
- This takes a LONG time
Burn the mpeg files with k3b using the video vcd (works for xvcd and svcd as well) or dvd project setup.
Make mpeg files that are appropriate for the standard you are using (vcd, svcd, xvcd (not recommended for compatibility with dvd players, but good quality), dvd, etc).
- Use digikam to do it.
- Tools -> Create Mpeg Slideshow
- use NTSC video type for compatibility with US DVD players
- This takes a LONG time
Burn the mpeg files with k3b using the video vcd (works for xvcd and svcd as well) or dvd project setup.
Thursday, December 11, 2008
Stackoverflow.com update
After having used Stackoverflow.com for awhile I must say that I am impressed.
I always thought that having a forum specifically for computer programmers would be a good idea.
But, I am VERY impressed with the implementation.
- The site has an incredible following
- The answers come very quickly and are almost always relevant and helpful
- It's almost faster to ask a question there and get responses than to search google and read through the results even when google gives you the correct answer.
Highly recommended for software developers.
I always thought that having a forum specifically for computer programmers would be a good idea.
But, I am VERY impressed with the implementation.
- The site has an incredible following
- The answers come very quickly and are almost always relevant and helpful
- It's almost faster to ask a question there and get responses than to search google and read through the results even when google gives you the correct answer.
Highly recommended for software developers.
Subscribe to:
Posts (Atom)
