Skip to content

Instantly share code, notes, and snippets.

Avatar

Konrad Kleine kwk

View GitHub Profile
@kwk
kwk / some.diff
Created Mar 3, 2022
disable one option in clang-format
View some.diff
commit c4c7c2092c34d1524f4afea18743d36d3b1f8ec8 (HEAD -> clang-format-unset)
Author: Konrad Kleine <kkleine@redhat.com>
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
View clang-output-spec
################################################################################
# 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 Jan 6, 2022
Github GraphQL Example with Python
View graphql.py
#!/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 Jan 4, 2022
Copr changelog entry with link to package build
View Changelog
Name: foo
Version: 1.0.0
Release: 1
Summary: foo
License: GPL
%description
some desc
@kwk
kwk / Makefile
Created Jun 11, 2021 — forked from rcmachado/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
View Makefile
.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, /^## (.*)/); \
View gist:f6593427f03dc2467bdacf8b1f8693c7
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 Sep 29, 2020
sanitizer-issue in gdb
View log.txt
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 Sep 29, 2020
ulimit of OpenShift container vs. local host
View ulimits.diff
--- 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 Sep 15, 2020
Output formatted information about a worker (useful for CI workers)
View Example output.json
{
"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 Aug 19, 2020
Build LLVM in container
View Dockerfile
FROM fedora:32
LABEL maintainer="Konrad Kleine <kkleine@redhat.com>"
LABEL author="Konrad Kleine <kkleine@redhat.com>"
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\