Skip to content

Instantly share code, notes, and snippets.

@moschlar
moschlar / JSSortableTableBase.py
Created May 12, 2012 12:37
JSSortableTableBase
tablesorter_js = JSLink(link=url('/jquery.tablesorter.js'),
javascript=[jquery_js])
class JSSortableTableBase(TableBase):
'''A TableBase that uses the jquery plugin tablesorter for table sorting'''
# javascript = [tablesorter_js]
# css_classes = ['tablesorter']
# Any additional arguments to tablesorter, see http://tablesorter.com/docs/#Configuration
@moschlar
moschlar / fsusage.c
Created January 30, 2012 18:00
get filesystem usage under linux
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/statvfs.h>
#include "pstatvfs.h"
#define ARGLEN 255
int main (int argc, char* argv[]) {
@moschlar
moschlar / pstatvfs.c
Created January 30, 2012 13:55
struct statvfs print function
#include <stdio.h>
#include <sys/statvfs.h>
void pstatvfs(struct statvfs *stat) {
printf("struct statvfs {\n");
printf("\tf_bsize = %lu\n", stat->f_bsize);
printf("\tf_frsize = %lu\n", stat->f_frsize);
printf("\tf_blocks = %d\n", (int) stat->f_blocks);
@moschlar
moschlar / gl.py
Created December 11, 2011 12:50
Travelling Salesman Problem visualized with pyopengl
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 09.12.2011
@author: moschlar
'''
from OpenGL.GL import *
from OpenGL.GLUT import *
1.
// Michael Neumann und Moritz Schlarb
2.
//
3.
// Programmiersprachen, SoSe 2010
4.
// Übung zur Vorlesung vom 19.04.2010
5.
//