We provide a detailed survey of approaches to compute the temperature of a PT100/PT1000 sensor from its measured resistance, including a new approach that allows provably sub-millikelvin-accurate correction for subzero temperatures without sacrificing performance.read more
Solving SSH’s “String too long” error message.read more
We provide a nginx configuration block that can be used to enable Let’s Encrypt webroot authentication for nginx sites that have a reverse-proxy-only configurationread more
An easy solution for libhogweed symbol lookup errorsread more
A detailed explanation on the issues of delays in RTOS like ChibiOS and a comprehensive list of methods how to solve themread more
This article provides a simple tutorial on how to use burnout current sources integrated in ADCs for sensor detection and basic characterization.read more
We provide a simple example on how to use SymPyread more
We provide a simple solution for querying the current resolution for a given X frame buffer device on Linux.read more
We provide a script that easily allows computing the output voltage adjust resistor for the Texas Instruments LP2980-ADJ and automatically selects the best actual resistor value.read more
How to build a multiple file upload system for the tornado webserverread more
We provide a fullyread more
We provide a simple Python script that can be used to calculate correct values for the Ilim resistor for the adjustable NCP380 current limiterread more
We provide a simple Python script that can be usedread more
We provide a simple Arduino sketch that enables the Arduino Leonardo to be used as a single-channel USB/UART bridge.read more
We provide a simple guide on how to access the normally hidden lwIP struct netif instance in the ChibiOS lwIP bindingread more
We provide a simple explanation and solution on undefined main_stack_size and process_stack_size linker variables in ChibiOS 3.xread more
We provide a simple example of how to use requesocks, a python request wrapper supporting SOCKS proxies for the specific usecase of using requests over Tor.read more
We provide a simple example on how to read the STM32 factory-set unique device IDread more
We provide a well-documented example code reading both temperature and voltage of STM32F0 microcontrollers in a computationally efficient mannerread more
We provide a script for automatic and live re-writing of damaged HDD LBAsread more
We provide a simple script to list files in a torrentread more
We provide a simple python script to read the UniProt text format as described on ExPASyread more
We provide example code for using the lwIP contrib SNTP client with ChibiOS HAL RTCs and insights into the art of selecting the right RTC clock source on STM32.read more
We provide a simple method of reading STM32 UUIDs using OpenOCD on the command line.read more
We provide an example program extracting author names from the Open Library data dump by means of Haskell conduitsread more
We provide a code snippet to easily get the current hour / minute / second in Haskell.read more
We provide a method of listing all devices that have a predefined profile for OpenWRT compilationread more
We provide a minimal raw AVR example using Atom to blink the LED on an Arduino Uno.read more
We provide a QuasiQuotation-based method of inlining C code embedded in Atom software without using explicit string declarationsread more
A guide and report on how I solved my Toshiba Z830/R850 backlight issues on Ubunturead more
We provide an utility functionread more
We provide a solution for the ‘commitAndReleaseBuffer: invalid argument (invalid character)’ error in Haskell programs.read more
We provide a code snippet to easily get the current year / month / day in Haskell.read more
We provide an utility to parse the OUI / IAB database into Haskell objects using attoparsec.read more
A guide on how to use chinese Unicode characters in LaTeXread more
A guide on how to call an external program and fetch its stdout and stderr from inside a Thunderbird/Firefox extension.read more
An example of how to invert a filter predicate in Haskellread more
We provide example code of how to use readlink without risking a buffer overflow.read more
A solution for the vpim gem invalid multibyte escape error messageread more
We provide a Python function to easily read a matblas-format substitution matrix into a Numpy array.read more
We provide a script to retrieve a list of countries per continent from Wikipediaread more
We provide a script to automatically convert a Pandas DataFrame to a LaTeX tabular.read more
We provide simple python methods to calculate the center string and related matrices for easier center string calculationread more
We provide a dependency-free, pure-Python GFF3 parser as a building block for custom changes by the user.read more
We provide a dependency-free, pure-Python parser for the NCBI GeneInfo formatread more
We provide a Saltstack SLS to increase the nginx server_names_hash_bucket_size config variable.read more
Example code on how to use zlib in Haskell to write gzip-compressed files.read more
We provide a script to read the STRING aliases file and map the KEGGread more
We provide a script to filter STRING protein-view database-dumps by NCBI taxonomy IDs.read more
We provide a fast dependency-free generator-based GO OBO v1.2 parser in Python.read more
In this article I show how to create tcp connections using only bashread more
We provide a copy-n-paste commandset to install Konsole Solarized highlighting.read more
We provide a Python-based compatible replacement for gtf2gff.plread more
We provide source code to iterate over lines in a gzip file using the boost::iostreams gzip_decompressor.read more
This post provides source code to read QUASAR alignment matrices efficiently using C++read more
We provide a simple python-based tool to compute basic statistical properties of your sequence data.read more
A guide on how to remove / delete all Docker images and containersread more
A guide on how to set column constraints using FXML in Java FXread more
An easy example of how to use stat()read more
Example of how to use stat() to check if a given file existsread more
Problem: You want to create a binary DEB package of the msgpack C++ binding. However, there is no official DEB package available.
Here’s a script that fully automates the process of building the deb package.
Before building it, you need to install the DEB build toolchain and libgtest-dev ...read more
Problem: On your Linux system, you want to check whether transparent hugepages are enabled on your system.
It’s pretty simple:
You will get an output like this:
always [madvise] never
You’ll see a list of all possible options ( always, madvise, never ...read more
Problem: You want to create a binary DEB package of libsodium. However, there is no official DEB package available.
Here’s a script that fully automates the process of building the deb package.
Before building it, you need to install the DEB build toolchain:read more
sudo apt-get install devscripts debhelper ...
Why another UML tutorial?
This is not the first tutorial on UML — there are hundreds of them publicly available on the internet. However, none of them seems to fulfill my requirements:
- All my computers and servers (= UML hosts) run on x86_64, not on i386.
- Use an up-to date (self-compiled) UML ...
Problem: Instead of grep printing lines that contain a match, you want it to print lines that don’t contain a match
Solution: Use the -v command line optionread more
Problem: You want grep to print only the match, not the entire line that contains the match
Solution: Use the -o command line option
If you use grep on a file list instead of stdin, you might want to add the command line option -h to suppress the filename the ...read more
A detailed guide on how to use mkdir() to create directoriesread more
Problem: You intend to install LevelDB, but you don’t want to manually install & compile it as described here.
Instead, you want to
Reasons for preferring not to compile & install manually could be: * You want to deploy LevelDB to one ore more environments that doesn’t have a complete build ...read more
We provide a minimal example of how to use mmapped files using the boost IOStreams library.read more
Guide on how to list all codecs supported by ffmpeg / avconv / libavconvread more
Using the libcurl easy API (http://curl.haxx.se/libcurl/c/libcurl-easy.html) you want to download a file using HTTP GET. No extended features such as authentication shall be used.
The download result shall be stored in a std::string
You can use this simple wrapper class ...read more
A guide on howto fix Android ADB error “error: insufficient permissions for device”read more
A guide on how to solve dynamic linking errors like “Cannot find crt1.o” on Ubuntu Linux. Might also work on other distributions.read more
Problem: You want to use the LLVM Gold linker plugin but LLVMgold.so can’t be found.
Solution: You should compile and install the LLVM gold plugin by yourself.
This guide has been tested on Ubuntu 12.04 and Ubuntu 12.10, but it should work on most Linux-based systems ...read more
We provide a step-by-step guide on how to compile & install libc++ on Linuxread more
Problem: You want to find out what the last revision number of a remote subversion repository is.
svn info provides what you need. Just combine it with grep and cutread more
svn info http://llvm.org/svn/llvm-project/llvm/trunk | grep Revision | cut -d' ' -f2
An easy example of how to printf to stderr instead of stdoutread more
We provide an easy solution for fixing the error “The name org.freedesktop.Hal was not provided by any .service files”read more
A easy solution for solving the ssh-add error message “Could not open a connection to your authentication agent”read more
Setting screen brightness on the command line using toshsetread more
Problem: You are running a configure script on Linux. It exits with a message like this:
./configure: line 3638: LT_INIT: command not found
You’re missing GNU libtool. Install it using your distribution’s package manager, for example on Ubuntu use
sudo apt-get install libtool
LT_INIT in the error ...read more
We provide a simple & reusable function to get local IP addresses in both Node.JS and CoffeeScriptread more
How to resolve the GCC error message “error: declaration of … shadows a parameter”read more
How to resolve the GCC error message “default argument for parameter of type … has type …”read more
We provide a simple yet easy algorithm for variable-length integer encoding in C++read more
Problem: In C++ you want to check if a given file exists, but you can’t use
stat()because your code needs to work cross-plaform.
Solution: This solution is 100% portable (stat() isn’t, even if it it’s widely support), but note that it opens the file, so it ...read more
A howto on using squashfs to create a highly compressed mountable image from a folder.read more
An easy guide on how to enable menu-style autocompletion in zsh.read more
In more recent Ubuntu Versions, the minimize, maximize and close icons are moved to the left.
If you want them to show up on the right side instead, follow this guide: 1. Open a terminal (e.g. click on Ubuntu Dashboard and type Terminal, then click on Terminal) 2. Copy ...read more
A totally useless program that converts any text to esoteric brainfuck or RNA code.read more
A guide on how to resolve the Android ADB sideload “error: closed” messageread more
Problem: You want to setup gitlab using Apache and unicorn (no passenger!), but it doesn’t work, no matter how hard you try.
Solution: You’re not alone with your problem. Even if there are numerous nice tutorials on the internet, none worked for me.
My final setup includes a ...read more
Update: Please also take a look at this followup article for an automatic compilation script that builds Ubuntu DEB packages!
Problem: You want to compile and install LevelDB (including development headers) on your Linux computer. ./configure && make && make install does not work so you don’t know how to do ...read more
What is the difference between scalar and packed instructions in SSE?read more
Problem: You have a video file and want to encode it to support all three HTML5 codecs currently available (WebM, Theora and H.264) on the majority of devices.
Solution: You can use ffmpeg for this task.
On Linux, you can use the following bash script, assuming you have installed ...read more
Problem: In the Linux shell, you have a path, e.g. ../images/photo.jpg and you want to strip the extension and the directory from it to get only photo.jpg
Essentially this is a combination of two problems I featured before. To find out how to strip the directory ...read more
Problem: In the Linux shell, you have a file path and you want to strip everything but the filename, for example you have the path ../images/photo.jpg and want only photo.jpg
Solution: Assuming the filename is stored in the shell variable $filename, use this snippet:read more
echo $filename | rev ...
An easy example of how to use Ruby to find the length of the longest line in a text fileread more
This article describes basic operations in manipulating bitfields using boolean operations. Although this article focuses in Java, most programming languages use the same syntax.read more
You’ve got a big problem. Someoneread more
forcesencourages you to implement a complete Othello UI+AI in Java, but you don’t have any idea how to do that. If you already know how to implement the basics and you are interested in more advanced strategy concepts, you might ...
A bash script to convert ZIP archives to TAR archivesread more
Problem: You have a filename in the Linux shell and want to strip/remove the filename extension from it - e.g. if you have myarchive.zip, you want to get only myarchive as output.
Solution: Let’s assume your original filename is saved in the bash variable $filename. Then you ...read more
Code example on how to encode/decode Base64 using libtomcryptread more
An example of how to compute cryptographic hashes (e.g. SHA1) using libtomcryptread more
Problem: You want to view a VNC on a screen with a different resolution than the screen you’re viewing (e.g. you want to view your Full HD desktop display on your Notebook).
Usually VNC viewers show scroll bars, but in some cases you need to view the entire ...read more
Problem: In GNU R, you have an arbitrary string s and want to count how often a given character occurs in s.
There might be a more efficient way, but substituting all occurrences in s by the empty string and counting the length difference works - the concept also works ...read more
We provide a simple example on how to define custom column families with custom font attributes in LaTeXread more
An example of how to configure Maven to include the Java source code in your JAR file.read more
In many cases if you want to create an interactive command line interface, you need to check if a number entered by the user is valid and - if it isn’t - you want the user to re-input it.
Here’s a simple static method to check if a number typed ...read more
We provide a simple solution for resolving the NPM “Cannot find module ‘graceful-fs’” errorread more
A guide on how to resolve the node-waf error “ImportError: No module named Scripting”read more
A short HOWTO on how to get my first el-cheapo FPGA board working on Linuxread more
How to iterate over C++11 smart pointers using C++11 foreachread more
Problem: In NodeJS, you got a size of something (a file?) in bytes, but you want to format it for better readability. For example if your size is 10000 bytes, you want to print “10 kilobytes”, but if it is 1200000, you want to print “1.20 megabytes”.
Solution: Use ...read more
Example code on how to the filesize in Node.JSread more