Skip to content

Instantly share code, notes, and snippets.

@neingeist
neingeist / gist:3bae8d937af603492717
Created September 25, 2014 20:03
MATLAB needs eth0 for its licensing system. So create one. (for Fedora 20 etc.)
# MATLAB needs eth0 for its licensing system. So create one:
ip link add eth0 type dummy
ip link set dev eth0 address 00:12:34:56:78:90:xy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\begin{equation} \label{eq:dft_1dconsymmetry}
\begin{aligned}
X_{-k} &\stackrel{\hphantom{x_n \in \mathbb{R}}}{=} \sum_{n=0}^{N-1}x_n\cdot e^{-i2\pi n -k/N} \\
&\stackrel{\hphantom{x_n \in \mathbb{R}}}{=} \sum_{n=0}^{N-1}x_n\cdot e^{+i2\pi n k/N} \\
&\stackrel{x_n \in \mathbb{R}}{=} X^*_k
\end{aligned}
\end{equation}
@neingeist
neingeist / gist:86d24ff38f7971f6dafc
Created March 15, 2015 13:05
a decorater example
from __future__ import division, print_function
from functools import wraps
import time
def timed(f):
"""Return a timed version of function f.
The returned function returns a tuple of (time, real return value)
@neingeist
neingeist / git-fsck-all
Created June 26, 2015 20:16
find all git repositories (and git working directories) starting from the current directory and perform a 'git fsck' on them.
#!/usr/bin/env python
"""
find all git repositories (and git working directories) starting from the
current directory and perform a 'git fsck' on them.
"""
from __future__ import division, print_function
from colorama import Fore
@neingeist
neingeist / daumen.css
Created November 4, 2015 11:44
stylisher twitterdaumen
@-moz-document domain(twitter.com) {
.HeartAnimationContainer {
visibility: hidden;
}
.HeartAnimationContainer:after {
content: '👍';
visibility: visible;
display: block;
position: absolute;
@neingeist
neingeist / burger.css
Created November 4, 2015 21:05
twitterburger (für stylish firefox extension)
@-moz-document domain(twitter.com) {
.HeartAnimationContainer {
visibility: hidden;
}
.HeartAnimationContainer:after {
content: '🍔';
visibility: visible;
display: block;
position: absolute;
@neingeist
neingeist / reboot-if-required.py
Created March 15, 2017 19:59
reboot-if-required
#!/usr/bin/python
from __future__ import print_function
import os
import random
import subprocess
import time
if os.path.exists('/var/run/reboot-required'):
sleep = random.randint(60, 1800)
@neingeist
neingeist / ppcontext.sh
Created September 3, 2017 19:40
ppcontext to filter context messages
#!/bin/sh
context --nonstopmode "$@" | egrep "non-existent entry|Overfull|unknown library|no data definition file|tex error|modules.*is not found|references.*unknown reference"
@neingeist
neingeist / userChrome.css
Last active November 17, 2017 16:40
remove firefox's normal tabs (e.g. if using »tree tabs«)
/* via https://github.com/piroor/treestyletab/issues/1349
save in .mozilla/firefox/<teh profile directory>/chrome/userChrome.css */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#TabsToolbar {
visibility: collapse !important;
}