Skip to content

Instantly share code, notes, and snippets.

View skovhus's full-sized avatar

Kenneth Skovhus skovhus

View GitHub Profile
from functools import wraps
from flask import request, current_app, jsonify
def support_jsonp(f):
"""Wraps output to JSONP"""
@wraps(f)
def decorated_function(*args, **kwargs):
result = jsonify(f(*args, **kwargs))
callback = request.args.get('callback', False)
@skovhus
skovhus / add_caf_metadata.m
Created October 21, 2012 15:41 — forked from merf/main.c
Adding instrument metadata to a caf file
/*
* Adding instrument metadata (node value) to a given caf file.
*
* Original author: https://gist.github.com/2640513
* Skovhus encountered a bug using gcc 4.2.1. This is the fixed version.
*
* 2012-10-21
*/
#include <stdio.h>