Xlib usage examples

Table of contents What is Xlib? Printing pressed keys Embedding window What is Xlib? Xlib (also known as libX11) is an X11 client library. It contains functions for interacting with an X server. This page provides several code snippets implementing complete X11 programs. Printing pressed keys The source code is available on …

Detecting USB devices with libudev

Below you can find code snippets that match USB devices using libudev. A good tutorial is available here: libudev and Sysfs Tutorial. Listing and monitoring USB devices The snippet first prints all detected USB devices, and then enters monitoring mode and prints USB devices when they are inserted or removed. Source code on …

httpexpect.v1: end-to-end HTTP API testing for Go

httpexpect is a new Go package for end-to-end HTTP and REST API testing. It provides convenient chainable helpers for building HTTP request, sending it, and inspecting received HTTP response and its payload. Links: repo on GitHub announcement on Reddit The key point is that request construction and response assertions become …