Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
| type Dispatcher struct { | |
| // A pool of workers channels that are registered with the dispatcher | |
| WorkerPool chan chan Job | |
| } | |
| func NewDispatcher(maxWorkers int) *Dispatcher { | |
| pool := make(chan chan Job, maxWorkers) | |
| return &Dispatcher{WorkerPool: pool} | |
| } |
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| "sync" | |
| "github.com/garyburd/redigo/redis" | |
| "github.com/gorilla/websocket" | |
| uuid "github.com/satori/go.uuid" |
| #coding=utf8 | |
| import itchat | |
| # tuling plugin can be get here: | |
| # https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
| from tuling import get_response | |
| @itchat.msg_register('Text') | |
| def text_reply(msg): | |
| if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
| return u'你可以在这里了解他:https://github.com/littlecodersh' |
| /* | |
| * Genarate rsa keys. | |
| */ | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" |
| var path = require('path'); | |
| var fs = require('fs'); | |
| // | |
| // Configuration | |
| // | |
| var config = { | |
| node_modules | |
| *.swp |
Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini: