Skip to content

Instantly share code, notes, and snippets.

View kwk's full-sized avatar

Konrad Kleine kwk

View GitHub Profile
@kwk
kwk / gist:3609801
Created September 3, 2012 14:42
mvn package failed on gerrit-2.4
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Gerrit Code Review - Parent
[INFO] Gerrit Code Review - Utility - SSL
[INFO] Gerrit Code Review - Patch commons-net
[INFO] Gerrit Code Review - Patch JGit
[INFO] Gerrit Code Review - Utility - CLI
[INFO] Gerrit Code Review - ANTLR
@kwk
kwk / gist:3978806
Created October 30, 2012 07:35
(Gerrit) Output of "mvn package"
kleine@mrburns:~/Kunden/GeneralPublic/gerrit (master %)$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Gerrit Code Review - Parent
[INFO] Gerrit Code Review - Utility - SSL
[INFO] Gerrit Code Review - Patch commons-net
[INFO] Gerrit Code Review - Patch JGit
[INFO] Gerrit Code Review - Utility - CLI
@kwk
kwk / CMakeLists.txt
Last active December 30, 2015 11:39
This parses a Person in the form "Some Name" 123 into a simple struct. `123` is the person's age. I know that his is overly complicated but I want to utilize the setter methods on the `Person` object to have more fine-grained control over the way my `Person` object is being modified. Here, this is just for showing how it can be done. Oh yeah, I …
project(inherited_attribute)
cmake_minimum_required(VERSION 2.8)
add_executable(inherited_attribute boost-spirit-inherited-attribute.cpp)
@kwk
kwk / linktype-response.json
Last active October 14, 2016 07:54
This is a collection of potential responses for our services in the the JSON API format
{
"jsonapi": {
"version": "1.0"
},
"meta": {
"comment": [
"This is an example response for querying the link type bug-blocker-link",
"in the JSON API format.",
"",
"This document is a fully valid JSON API document. It's length is caused",
{
"meta" : {
"totalCount" : 1
},
"links" : {
"last" : "http://localhost:8080/api/workitems?page[offset]=0&page[limit]=20&filter[iteration]=64e8b7a1-f6b0-4712-9f13-2ce09f2f54ba",
"first" : "http://localhost:8080/api/workitems?page[offset]=0&page[limit]=20&filter[iteration]=64e8b7a1-f6b0-4712-9f13-2ce09f2f54ba"
},
"data" : [
{
{
"data" : [
{
"relationships" : {
"workitems" : {
"links" : {
"related" : "http://localhost:8080/api/workitems?filter[iteration]=64e8b7a1-f6b0-4712-9f13-2ce09f2f54ba"
}
},
"space" : {
@kwk
kwk / build-and-run.sh
Created February 2, 2017 14:32
Build and run a custom almighty-core docker image and run it
# Checkout the sourcecode
cd /tmp
git clone https://github.com/almighty/almighty-core.git
cd almighty-core
# Start a container that has all the build tools installed
make docker-start
# Run all the steps in order to create the artifacts
make docker-build
@kwk
kwk / create_random_links.sql
Created February 27, 2017 16:57
Creates links from a given type between distinct work items.
@kwk
kwk / add-member-to-each-wit-field.sql
Created March 3, 2017 00:23
add-member-to-each-wit-field.sql
DO
$BODY$
DECLARE
wit record;
field record;
BEGIN
-- Loop over each WIT
FOR wit IN SELECT * FROM work_item_types LOOP
RAISE NOTICE 'WIT % - %', wit.id, wit.name;
@kwk
kwk / get_flename_of_decl.cxx
Last active March 28, 2017 20:56
Get filename/path of clang::Decl
static const clang::FileEntry * getFileEntryForDecl(const clang::Decl * decl, clang::SourceManager * sourceManager)
{
if (!decl || !sourceManager) {
return 0;
}
clang::SourceLocation sLoc = decl->getLocation();
clang::FileID fileID = sourceManager->getFileID(sLoc);
return sourceManager->getFileEntryForID(fileID);
}