Skip to content

Instantly share code, notes, and snippets.

View nderjung's full-sized avatar
🥑

Alexander Jung nderjung

🥑
View GitHub Profile
@nderjung
nderjung / first-commit-of-unikraft-libs.sh
Last active April 30, 2021 07:56
first-commit-of-unikraft-libs.sh
#!/bin/bash
for L in ./unikraft/libs/*; do
DATE=$(git -C L show \
--date=format:'%Y-%m-%d %H:%M:%S' \
--no-patch \
--no-notes \
--format="%cd" \
$(git -C $L rev-list \
--max-parents=0 HEAD \
@nderjung
nderjung / Makefile
Created December 16, 2020 08:00
Golang Makefile
# SPDX-License-Identifier: BSD-3-Clause
#
# Authors: Alexander Jung <alex@nderjung.net>
#
# Copyright (c) 2020, Alexander Jung. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
@nderjung
nderjung / xentop.c
Last active June 29, 2019 12:11
Modified xentop to produce time series
/* libxenstat: statistics-collection library for Xen
* Copyright (C) International Business Machines Corp., 2005
* Authors: Josh Triplett <josh@kernel.org>
* Judy Fischbach <jfisch@cs.pdx.edu>
* David Hendricks <cro_marmot@comcast.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
From f56ddf297d2ba1d15187df8b4d4ecbd46e9718d9 Mon Sep 17 00:00:00 2001
From: Alexander Jung <a.jung@lancs.ac.uk>
Date: Tue, 25 Jun 2019 18:14:40 +0000
Subject: [PATCH] xs-test: fix asprintf unused result
The XenStore test suite assigns values to a path via a pass-by-reference but
the method asprintf returns a success int which is unsed. This causes builds
to fail via -Werror=unused-result. This patch remedies this by exiting the
xs-test program if on the unlikely occassion it could not assign the variables
to the path format.
From 29f0bfc54b504d6cc5c371afd5623164a8020f09 Mon Sep 17 00:00:00 2001
From: Haris Rotsos <crotsos@lancaster.ac.uk>
Date: Mon, 10 Jun 2019 15:55:10 +0000
Subject: [PATCH 2/2] fixing page sharing and making the compilation to work
with the latest clickos update
---
include/xensocket.h | 137 ++++---
stub.mk | 2 +-
xensocket.c | 1078 +++++++++++++++++++++++++++------------------------
From 97b4f22565ce0aed81c633295c30a591051e37ee Mon Sep 17 00:00:00 2001
From: Haris Rotsos <crotsos@lancaster.ac.uk>
Date: Tue, 14 May 2019 21:51:34 +0000
Subject: [PATCH 1/2] got a first xensocket functioality that compiles but
still needs work to complete
---
Makefile | 9 +-
include/xensocket.h | 102 +++++
stub.mk | 1 +
@nderjung
nderjung / clean-git-submodules.sh
Created June 13, 2019 21:41
Clean git submodules
#!/bin/bash
# Context: you have a number of git submodules and those git repositories
# are now dirty with build artifacts. To completely clean the submodules
# and reset them to their original clone state, perform the following:
git submodule foreach 'git fetch origin; git checkout $(git rev-parse --abbrev-ref HEAD); git reset --hard origin/$(git rev-parse --abbrev-ref HEAD); git submodule update --recursive; git clean -dfx'
[Definition]
failregex = no user/password was provided for basic authentication.*client: <HOST>
user .* was not found in.*client: <HOST>
user .* password mismatch.*client: <HOST>
ignoreregex = </host></host></host>
[nginx-auth]
enabled = true
filter = nginx-auth
action = iptables-multiport[name="nginxauth", port="http,https", protocol="tcp"]
@nderjung
nderjung / crypt_unlock.sh
Created May 30, 2019 17:38 — forked from gusennan/crypt_unlock.sh
initramfs-hook for unlocking LUKS-encrypted LVM partition
#!/bin/sh
PREREQ="dropbear"
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
@nderjung
nderjung / post-receive.d-mirror.sh
Created May 17, 2019 12:01
Git mirror via post-receive hook
#!/bin/sh
GIT_REMOTE_REPO=git@github.com:nderjung/my-cool-mirror.git
SSH_KEY=~/.ssh/id_my_cool_mirror
GIT_DIR=${GIT_DIR:-$(dirname $0)}
GIT_SSH_COMMAND="ssh -i $SSH_KEY -F /dev/null -oStrictHostKeyChecking=no" git push --mirror $GIT_REMOTE_REPO