This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################################################## | |
# | |
# check-commit-signature | |
# ---------------------- | |
# A server-side update git hook for checking the GPG signature of a pushed | |
# commit. | |
# | |
# To enable this hook, rename this file to "update". | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Mapping | |
from twisted.names import dns, server, client, cache | |
from twisted.application import service, internet | |
class MapResolver(client.Resolver): | |
def __init__(self, mapping, servers): | |
client.Resolver.__init__(self, servers=servers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define for_x for (int x = 0; x < w; x++) | |
#define for_y for (int y = 0; y < h; y++) | |
#define for_xy for_x for_y | |
void show(void *u, int w, int h) | |
{ | |
int (*univ)[w] = u; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$provider = new stdClass; | |
$provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */ | |
$provider->name = 'sso1'; | |
$provider->title = 'sso1'; | |
$provider->url = 'http://sso1.loc/'; | |
$provider->consumer_advanced = array( | |
'signature method' => 'HMAC-SHA512', | |
'request token endpoint' => '/oauth/request_token', | |
'authorization endpoint' => '/oauth/authorize', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Thu 2015-12-10 11:32:31 CET, end at Tue 2016-05-10 22:58:29 CEST. -- | |
May 10 21:29:17 carpo systemd-journald[284]: Runtime journal (/run/log/journal/) is 8.0M, max 787.6M, 779.6M free. | |
May 10 21:29:17 carpo systemd-journald[284]: System journal (/var/log/journal/) is 1.9G, max 4.0G, 2.0G free. | |
May 10 21:29:17 carpo systemd-journald[284]: Time spent on flushing to /var is 96.647ms for 2 entries. | |
May 10 21:29:17 carpo kernel: Linux version 4.5.3-1-ARCH (builduser@tobias) (gcc version 6.1.1 20160501 (GCC) ) #1 SMP PREEMPT Sat May 7 20:43:57 CEST 2016 | |
May 10 21:29:17 carpo kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=92fdeb9f-682d-475b-b60c-40d7a224d7de rw cryptdevice=/dev/sda2:cryptroot quiet | |
May 10 21:29:17 carpo kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 | |
May 10 21:29:17 carpo kernel: x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers' | |
May 10 21:29:17 carpo kernel: x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers' | |
May 10 21:29:17 carpo ke |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import datetime | |
import subprocess | |
from collections import Counter | |
if __name__ == '__main__': | |
hours = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval $(ls /dev/drbd* | sed 's/\/dev\/drbd//g' | awk '{print "drbdsetup " $1 " down;"}' ) ; lvremove -f /dev/platform_test/*-0 ; lvremove -f /dev/platform_test/*-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvzMU1f2mRAMTSSJmLp3QFfnZIk4AGlZQggSO1OuMEn9sqvmHSEyckW516A4eoqBvukFod4bBjl72bNZBMSCXjgELmiGxNvr0iDeuefSR4vHKBqgUp9HhDakSNGz6eBjV5XN0iyhzwe/0N4PHq0wlwwETAE1QzHGia9RiIfpo6jYUPehzUi7CKXJLmmtaOTRm6zRNdrj1P97ZBw/5CbPT2yOYPQlnl1A/FQqxocODKTSCGQSvrOZ1Y0qCmg0Fl63PcpH2KDZW5FIcIA8yPWE07xT7zfQOe+wu3IZ+aK38hUGdoZmzYPlGo49vf03/KOo6vwBUzeY2SEbZ/Nflu+F80Q== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import collections | |
def get_current_mounts(): | |
""" Get the currently mounted filesystems. """ | |
# Reading from /proc/mounts is only consistent within a single read(3) | |
# call. Unfortunately, the maximum amount of data you can get from | |
# this file in a single call is hardcoded by the kernel to PAGE_SIZE | |
# (4096 bytes on x86). As a consequence, there is no way to read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@deferred | |
def deferred_check_missing(node, kw): | |
try: | |
json_request = kw.get("request").json_body | |
except ValueError: | |
raise Invalid(node, "Malformed JSON provided") | |
if "mail" not in json_request and "uuid" not in json_request: | |
raise Invalid(node, "Both mail and uuid are missing") |
NewerOlder