This Python script is not maintained and was replaced by the more robust Rust version below:
image: "rust:latest" | |
default: | |
before_script: | |
- rustc --version | |
- cargo --version | |
stages: | |
- test |
import os | |
import time | |
import re | |
import subprocess | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
def get_relative_path(path): | |
return os.path.relpath(path) |
Chronological list of the "systemd for Administrators" series published on 0pointer.net/blog:
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# jeroen@massar.ch - http://jeroen.massar.ch | |
server { | |
listen 192.0.1.1:80; | |
listen [2001:db8::1]:80; | |
# Redirect all non-HTTPS traffic to the HTTPS variant | |
return 301 https://$host$request_uri; | |
} |
Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.
You'll probably be working with a single smartcard, so you'll want only one primary key ( |
# Old-school GPG config was taken from the following docs. I'm preserving these | |
# links here just in case I need to configure an old version of mutt & gnupg in | |
# the future without gpgme. | |
# * /usr/share/docs/mutt/gpg.rc | |
# * http://codesorcery.net/old/mutt/mutt-gnupg-howto | |
# * http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG | |
# | |
# Mutt now has solid support for GPGME, which not only makes config much | |
# simpler and eliminates the need to fork gpg processes & parse their output - | |
# it also makes working with gpg-agent, kwallet, gnome-keyring etc. a doddle |
[Unit] | |
Description=Service that restarts my spread_goodness.service every two hours. | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/systemctl try-restart spread_goodness.service |
The C standard only specifies minimum limits for the values of character types and standard integer types. This makes it possible to generate efficient code on diverse architectures, but can pose problematic if your code expects the limits to match your development platform, or if you have to do low-level things.
Before C99, the usual way to solve this was to use typedef to declare synonyms
When I was working on a generic port of Google's hashmap to C, I wrote a function that (ignoring irrelevant parts) looked like this:
typedef struct {
uint8_t *bytes;
size_t len;
} bytebuf;