Skip to content

Instantly share code, notes, and snippets.

View nils-werner's full-sized avatar

Nils Werner nils-werner

View GitHub Profile
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.legacy.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.grids.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.frames.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.forms.css">
<link rel="stylesheet" type="text/css" media="screen" href="http://symphony2.localhost/symphony/assets/css/symphony.tables.css">
@nils-werner
nils-werner / config.txt
Created October 31, 2012 11:30
OpenELEC Raspi Config
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue ([email protected])
# Inspired and partly copied from:
# http://youresuchageek.blogspot.fr/2012/09/howto-raspberry-pi-openelec-on.html
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
@nils-werner
nils-werner / .bash_completion
Last active December 17, 2015 12:59
Autocompletion for Composer and Artisan
# Put this either in
#
# 1. a new file called ~/.bash_completion
# 2. your ~/.bashrc
#
_composer()
{
local cur=${COMP_WORDS[COMP_CWORD]}
local cmd=${COMP_WORDS[0]}
#!/usr/bin/env python
import numpy as np
import pyaudio
import scipy.io.wavfile as wav
import random
import time
import gc
from numpy import zeros, mat, matrix, sqrt, sin, arange, pi, exp, cos, array, dot, max, abs, int16, eye
@nils-werner
nils-werner / Audio.py
Created July 12, 2013 22:11
IPython Notebook Audio Viewer
from IPython.core.display import DisplayObject
import StringIO
import base64
import struct
import sys
class Audio(DisplayObject):
def __init__(self, data=None, rate=None, url=None, filename=None, autoplay=False):
if(data is not None):
buffer = StringIO.StringIO()
@nils-werner
nils-werner / Makefile
Created October 16, 2013 19:03
LaTeX build system
MAKEFLAGS += -j1
LATEXFLAGS += -interaction=batchmode
TEXPATH += .:./lib//:
.PHONY: document beispiel desktop preview images clean cleanall
document: thesis.pdf cover.pdf back.pdf
cover: cover.pdf
# Contributor: Christian Thurau <christian DOT thurau AT iais DOT fraunhofer DOT de>
pkgname='python2-pymf'
pkgver=0.1.9
pkgrel=1
pkgdesc="Python Matrix Factorization (PyMF) is a module for several constrained/unconstrained matrix factorization (and related) methods"
url="http://code.google.com/p/pymf/"
arch=('any')
license=('GPL3')
depends=('python2' 'python2-cvxopt')
source=(https://pypi.python.org/packages/source/P/PyMF/PyMF-$pkgver.tar.gz pymf-$pkgver.patch)
#!/bin/sh
SUBLIME="subl"
# We need to remove the stupid "file://" that Evince puts in front of the file name
# Notice the wild quoting: we need to interpolate $SUBLIME
# In the end, EDITORCMD should be of the form:
#
# f=%f; sublime-text "${f#file://}:%l"
#
@nils-werner
nils-werner / gist:7135162
Last active December 26, 2015 10:09
Speaker TikZ
\def\speaker{%
(11mm,2mm) -- +(0mm,-4mm)
(13mm,4mm) -- +(0mm,-8mm)
(15mm,6mm) -- +(0mm,-12mm)
(0mm,0mm) -- +(0mm,-3mm) -- +(4mm,-3mm) -- +(9mm,-7mm) -- +(9mm,7mm) -- +(4mm,3mm) -- +(0mm,3mm) -- +(0mm,0mm)
}
@nils-werner
nils-werner / sections.php
Last active August 29, 2015 13:57
Kirby snippet sections
<?php
/*
* Snippet Templates
*
* A plugin to inject sections into snippets
*
* Sample Usage:
*
* In your snippet: