Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Pape krono

  • Hasso Plattner Institute
  • Potsdam, Germany
View GitHub Profile
@krono
krono / mlnx_sriov.sh
Last active Sep 16, 2021 — forked from koallen/mlnx_sriov.sh
Script to enable SRIOV virtual functions on Mellanox cards
View mlnx_sriov.sh
#!/bin/bash
set -eu
# Hat tip to https://gist.github.com/koallen/32709a244d77a2c0f8e17ed79a4092ed
MLNX_SRIOV_DEVICES=""
[ -e /etc/default/mlnx_sriov ] && . /etc/default/mlnx_sriov
# params
# - device sys path (e.g. /sys/class/infiniband/mlx5_0)
View gist:62718af3b68ae1368dd7a19c61428706
~45 Pages, some TeX shenanigans.
lualatex paper 153,96s user 8,90s system 98% cpu 2:45,71 total
xelatex paper 30,13s user 1,97s system 100% cpu 31,794 total
pdflatex paper 37,18s user 1,46s system 99% cpu 38,812 total
@krono
krono / targettestpinning.py
Created Jul 23, 2019
Test the pinning problem
View targettestpinning.py
from rpython.rtyper.lltypesystem import rffi
from rpython.translator.tool.cbuild import ExternalCompilationInfo
eci = ExternalCompilationInfo(
post_include_bits=["""
#ifndef __pinningtest_h
#define __pinningtest_h
#ifdef _WIN32
@krono
krono / xe-update-stats.sh
Created Oct 19, 2018
Update Xen info from an OpenBSD guest
View xe-update-stats.sh
#!/bin/sh
#
# add to /etc/rc.local
# [ -x /usr/local/bin/xe-update-stats ] && /usr/local/bin/xe-update-stats init
# add to `crontab -e`
# 1-59 * * * * /bin/sh /usr/local/bin/xe-update-stats
if [ "$1" = "init" ]; then
@krono
krono / xnf-to-host.sh
Last active Oct 19, 2018
Send ip addresses to Xen for info on OpenBSD
View xnf-to-host.sh
for ifline in $(dmesg | grep address | sed -E -e 's/^(xnf.+)\ at.*address\ ([a-fA-F0-9:]+)/\1=\2/' | sort); do
mac=$(echo $ifline | cut -d= -f2)
if=$(echo $ifline | cut -d= -f1)
for vif in $(hostctl device/vif); do
if [ "$mac" = "$(hostctl device/vif/$vif/mac)" ]; then
ip4=$(ifconfig $if | grep 'inet[^6]' | cut -d ' ' -f2)
ip6=$(ifconfig $if | grep 'inet6' | cut -d ' ' -f2 | cut -d% -f1)
if [ -n "$ip4" ]; then
hostctl attr/eth$vif/ip "$ip4"
fi
View Moep.st
'From Squeak5.2beta of 12 September 2018 [latest update: #18193] on 18 September 2018 at 1:48:53 pm'!
Model subclass: #Moep
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Moep'!
!Moep methodsFor: 'toolbuilder' stamp: 'topa 9/18/2018 13:48'!
buildContentsWith: builder
View configureMySystem.st
"-=-=-=-=-="
" This gets us Metacello "
"-=-=-=-=-="
Installer gemsource
project: 'metacello';
addPackage: 'ConfigurationOfMetacello';
install.
"Bootstrap Metacello Preview, using mcz files (#'previewBootstrap' symbolic version"
View rsqueak-hotfixes.1.cs
'From Squeak5.0 of 15 January 2016 [latest update: #15117] on 4 February 2016 at 1:52:02 pm'!
Object subclass: #RSqueak
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'RSqueak'!
!AutoStart class methodsFor: 'initialization' stamp: 'tfel 2/4/2016 13:09'!
startUp: resuming
"The image is either being newly started (resuming is true), or it's just been snapshotted.
View ban-ssh.sh
#!/bin/sh
PORT=22
TIMEOUT=600
for IPTABLE in iptables ip6tables; do
case "${IPTABLE}" in
iptables) LOCALHOST="127.0.0.1";;
ip6tables) LOCALHOST="::1";;
esac
View LexiComb.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.