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:
package com.willowtreeapps.demo; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.KeyEvent; | |
import android.view.Window; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { |
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:
from flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/base/<path:filename>') | |
def base_static(filename): | |
return send_from_directory(app.root_path + '/../static/', filename) |
#!/bin/sh | |
# PROVIDE: vpn | |
# REQUIRE: LOGIN | |
# KEYWORD: shutdown | |
# | |
# vpn: connect to VPN, start another service once VPN is connected. | |
# | |
# Uses OpenVPN and assumes the configuration does not need any authentication | |
# beyond the given .conf file. Consider an approach using `expect` if needed: | |
# |
#!/bin/sh | |
# Use grub to boot .iso files directly from /boot/iso. | |
# | |
# This file lives at /etc/grub.d/25_iso and is executable. | |
# | |
# Open .iso files to inspect internal /boot files for grub config hints. | |
# /boot is on the third partition of a gpt-partitioned USB drive. | |
ISO_PART_UUID="0a5086cd-8fdf-4ae0-a248-67411ebbbb18" # UUID of /boot `blkid`. | |
ISO_PART_NUMBER=3 |
"Plot a PNG using matplotlib in a web request, using Flask." | |
# Install dependencies, preferably in a virtualenv: | |
# | |
# pip install flask matplotlib | |
# | |
# Run the development server: | |
# | |
# python app.py | |
# |
# Edit this file then run `update-haproxy haproxy-servers.cfg`. | |
# Alternatively, use a shell pipeline to build server list `... | update-haproxy`. | |
server demo1 127.0.0.1:8001 check cookie demo1 weight 100 | |
server demo2 127.0.0.1:8002 check cookie demo2 weight 100 | |
server demo3 127.0.0.1:8003 check cookie demo3 weight 0 | |
server demo4 127.0.0.1:8004 check cookie demo3 weight 0 |
# Key project interactions, but not all dependencies are resolved by make. | |
help: | |
@heroku help | |
run: | |
python manage.py runserver | |
shell: | |
python manage.py shell |
#!/usr/bin/env hy | |
;; match.hy - Getting started with hy (hylang.org), a simple example. | |
;; | |
;; As executable, `chmod +x match.hy`: | |
;; | |
;; $ ./match.hy '(.*), (.*)!' 'Hello, world!' | |
;; ('Hello', 'world') | |
;; | |
;; Developed on hy master 14c412c (after 0.11.1) on Python 3.5. | |
;; |