Skip to content

Instantly share code, notes, and snippets.

/*
A CSS for blog.fefe.de optimized for smartphones with oled displays.
(Based on fefeblog.css)
*/
html{font-family:"Trebuchet MS", Helvetica, Arial, Sans-Serif;color:Lightgray;background:#000}
blockquote{font-style:italic}
blockquote:before{content: "\201E"}
blockquote:after{content: "\201C"}
a:link{color:yellow}
ul{padding-left:0}
@HeMe2
HeMe2 / thread_synchronization_timing.cpp
Last active November 28, 2019 17:50
Measures and prints the times for thread creation and mutex synchronization in nanoseconds.
/// @file thread_synchronization_timing.cpp
/// @brief Measures and prints the times for thread creation and mutex synchronization in nanoseconds.
/// @author Henning Mende
/// @date Nov 22, 2019
/// @copyright Henning Mende
///
/// Compile with posix pthread library:
/// @code
/// g++ thread_related_timing.cpp -pthread
/// @endcode
@HeMe2
HeMe2 / static_array_allocation.cpp
Last active August 15, 2018 17:53
C++ class with adjustable inner array size allocated on stack and at compiletime (requires C++11)
/*
* static_array_allocation.cpp
*
* Created on: Aug 15, 2018
* Author: HeMe2
*/
typedef int my_specific_type;
template<int ARRAY_LEN>
@HeMe2
HeMe2 / makefile
Last active October 24, 2018 11:34
makefile to compile latex files in linux environment
# insert preferred tools here
CC = pdflatex
BIB = bibtex
READER = xreader
# name of your main tex file without file extension
NAME = my_document
# files your document depends on, eg. bibliography or pictures
ADD =
@HeMe2
HeMe2 / git_author_checker.py
Last active February 20, 2018 16:31
python script for git on public machines, to force users to provide their author name to commits
#!/bin/usr/python3
# This script analyzes the given arguments and if no "--author" is included in the argument list it forces the user to
# enter his credentials. To force all git calls to pass this script, set this as an alias in the .bashrc or the
# .bash_aliases by adding the following line:
# alias git='python3 <path_to_this_script>'
if __name__== "__main__":
import sys
from subprocess import call