Skip to content

Instantly share code, notes, and snippets.

@HaiyangXu
HaiyangXu / Server.py
Created May 18, 2014 14:00
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@sixthgear
sixthgear / vect.h
Created December 21, 2011 22:14
Generic Vector Type in C
#ifndef VECT_H
#define VECT_H
/*
* vect.h -- type-safe generic dynamic array
* made by sixthgear. BSD Licenced.
*/
#include <stdio.h>
#include <stdlib.h>