Skip to content

Instantly share code, notes, and snippets.

View WOnder93's full-sized avatar

Ondrej Mosnáček WOnder93

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wonder93 on github.
  • I am omos (https://keybase.io/omos) on keybase.
  • I have a public key ASARFIKiby968Vv4EWA71JwQNwqLENMQh_ASqmXjJDBSMQo

To claim this, I am signing this object:

@WOnder93
WOnder93 / redundancy_test.sh
Created May 28, 2019 14:21
Test for removal of redundant rules from SELinux policy
#!/bin/bash
set -e
set -o pipefail
function any_line()
{
local n=$(wc -l)
[ $n -gt 1 ] && echo "$n"
[ $n -ne 0 ]
#!/usr/bin/python3
import setools
from collections import defaultdict
def build_ddict(p):
res = {}
for t in p.types():
res[str(t)] = [str(t)] + [str(a) for a in t.attributes()]
@WOnder93
WOnder93 / check_benches.sh
Last active March 29, 2018 12:37
Stockfish - scripts for automated bench comparison
#!/bin/bash
if [ $# -eq 0 ]; then
echo "usage: [SYZYGY_PATH='...'] [BENCH_ARGS='...'] $0 COMMIT..."
echo
echo " Prints bench for each COMMIT. Output is stored in 'bench-COMMIT.log'."
echo
echo " Command-line arguments:"
echo " COMMIT... list of commits to check"
echo
@WOnder93
WOnder93 / kernel.cu
Last active December 15, 2016 10:47
PB197 - project solution
/*
* Copyright (C) 2016, Ondrej Mosnacek <omosnacek@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@WOnder93
WOnder93 / profiling.h
Created July 18, 2016 09:43
Profiling microframework for the Linux kernel.
#ifndef _CRYPTO_PROFILING_H
#define _CRYPTO_PROFILING_H
#ifdef USE_PROFILING
#include <linux/ktime.h>
#ifndef PROFILING_STACK_SIZE
#define PROFILING_STACK_SIZE 64
#endif
@WOnder93
WOnder93 / cryptsetup_benchmark.sh
Created June 30, 2016 11:21
Cryptsetup benchmark script
#!/bin/bash
VERSIONS='1.6.8 1.7.0'
BACKENDS='openssl gcrypt'
HASHES='ripemd160 sha1 sha256 sha512'
TEMPFILE=$(mktemp)
dd if=/dev/zero of="$TEMPFILE" count=1 bs=8M
@WOnder93
WOnder93 / grub-iso.sh
Last active December 17, 2015 21:39
This script allows you to boot some ISO images from GRUB.
#!/bin/sh
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib
ROOTDIR=""
ISODIR="home/shared/iso"