Skip to content

Instantly share code, notes, and snippets.

View kwk's full-sized avatar

Konrad Kleine kwk

View GitHub Profile
@kwk
kwk / some.diff
Created March 3, 2022 17:06
disable one option in clang-format
commit c4c7c2092c34d1524f4afea18743d36d3b1f8ec8 (HEAD -> clang-format-unset)
Author: Konrad Kleine <[email protected]>
Date: Thu Mar 3 16:17:35 2022 +0000
[clang-format] Allow AlignAfterOpenBracket to be disabled
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index d4e859f4decc..8275cc77e604 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@kwk
kwk / clang-output-spec
Created January 10, 2022 14:37
RPKG Experiment
################################################################################
# BEGIN SNAPSHOT PREFIX
################################################################################
# FIXME: Disable running checks for the time being
%global _without_check 1
%bcond_without snapshot_build
%if %{with snapshot_build}
@kwk
kwk / graphql.py
Created January 6, 2022 21:38
Github GraphQL Example with Python
#!/bin/env python3
import argparse
import datetime
import os
from string import Template
import requests
from pprint import pprint
import logging
import contextlib
@kwk
kwk / Changelog
Last active January 4, 2022 13:28
Copr changelog entry with link to package build
Name: foo
Version: 1.0.0
Release: 1
Summary: foo
License: GPL
%description
some desc
@kwk
kwk / Makefile
Created June 11, 2021 11:51 — forked from rcmachado/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
.SILENT:
.PHONY: help
# Based on https://gist.github.com/prwhite/8168133#comment-1313022
## This help screen
help:
printf "Available targets\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
@kwk
kwk / gist:f6593427f03dc2467bdacf8b1f8693c7
Created November 16, 2020 13:47
buildbot master error
2020-11-16 13:47:14+0000 [Broker,12,10.128.4.1] invalid login from unknown user 'alice'
2020-11-16 13:47:14+0000 [Broker,12,10.128.4.1] Peer will receive following PB traceback:
2020-11-16 13:47:14+0000 [Broker,12,10.128.4.1] Unhandled Error
Traceback (most recent call last):
File "/usr/lib64/python3.9/site-packages/twisted/cred/portal.py", line 119, in login
return maybeDeferred(self.checkers[i].requestAvatarId, credentials
File "/usr/lib64/python3.9/site-packages/twisted/internet/defer.py", line 151, in maybeDeferred
result = f(*args, **kw)
File "/usr/lib64/python3.9/site-packages/twisted/internet/defer.py", line
@kwk
kwk / log.txt
Created September 29, 2020 12:48
sanitizer-issue in gdb
sh-5.0$ cd build
sh-5.0$ LSAN_OPTIONS=verbosity=1:log_threads=1 lldb ./a.out
sh: lldb: command not found
sh-5.0$ LSAN_OPTIONS=verbosity=1:log_threads=1 gdb ./a.out
GNU gdb (GDB) Fedora 9.1-6.fc32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
@kwk
kwk / ulimits.diff
Created September 29, 2020 11:57
ulimit of OpenShift container vs. local host
--- ulimits.container 2020-09-29 13:20:19.420493947 +0200
+++ ulimits.host 2020-09-29 13:20:35.049552462 +0200
@@ -2,15 +2,15 @@
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
-pending signals (-i) 257339
+pending signals (-i) 127410
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
@kwk
kwk / Example output.json
Created September 15, 2020 11:17
Output formatted information about a worker (useful for CI workers)
{
"worker_information": [
{"key":"System Information", "value":"Linux work 5.6.12-300.fc32.x86_64 #1 SMP Mon May 11 16:47:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"},
{"key":"CPU model", "value":"Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz"},
{"key":"Number of Cores", "value":"8"},
{"key":"Operating System", "value":"Fedora release 32 (Thirty Two)"},
{"key":"Bash Version", "value":"GNU bash, version 5.0.11(1)-release (x86_64-redhat-linux-gnu)"},
{"key":"GCC Version", "value":"gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"},
{"key":"Clang Version", "value":"clang version 10.0.0 (Fedora 10.0.0-1.fc32)"},
{"key":"CCache Version", "value":"ccache version 3.7.7"},
@kwk
kwk / Dockerfile
Created August 19, 2020 11:50
Build LLVM in container
FROM fedora:32
LABEL maintainer="Konrad Kleine <[email protected]>"
LABEL author="Konrad Kleine <[email protected]>"
LABEL description="An image to build and test LLVM"
ENV LANG=en_US.utf8
RUN echo -e "\
[buildkite-agent] \n\
name = Buildkite Pty Ltd \n\