Skip to content

Instantly share code, notes, and snippets.

@jboockmann
jboockmann / DSIsrcSetup.sh
Last active August 31, 2019 12:52
DSIsrc setup script
#!/bin/bash
DSI_DIR=/opt/DSI
CILLY_BIN=$DSI_DIR/cil-cil-1.7.3/bin/cilly
sudo apt install --yes wget git unzip openjdk-7-jre openjdk-7-jdk ocaml ocaml-findlib make build-essential
mkdir $DSI_DIR
cd $DSI_DIR
@jboockmann
jboockmann / Dockerfile
Last active January 8, 2019 09:33
SWTbahn-cli client setup
# docker build -t swtbahn-cli-client .
# docker run -v $PWD:/app -it swtbahn-cli-client /bin/bash
FROM python:3
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN pip3 install click requests pyaml
@jboockmann
jboockmann / findFileWithHash.md
Created December 6, 2018 08:37
Find a file with a given MD5 hash
$ touch foo.md

$ md5sum foo.md
1452c8e52a24ceb37980635396b7048a  foo.md

$ find ~/ -type f -exec md5sum {} + | grep '^1452c8e52a24ceb37980635396b7048a'
@jboockmann
jboockmann / DsiRenameResults.sh
Last active February 17, 2019 14:48
DSI result renaming script
mv log dsi;
cd dsi;
mkdir ptg;
mv *.dot ptg;
rm log;
mv agg asg;
mv mbg sg;
mv mmbg fsg;
@jboockmann
jboockmann / towards-safe-enclaves-function-pointer-example.c
Created September 2, 2018 11:28
Function pointer example from the 'Towards Safe Enclaves' paper
/*
Neline van Ginkel, Raoul Strackx, Jan Tobias Mühlberg, Frank Piessens
"Towards safe enclaves."
4th Workshop on Hot Issues in Security Principles and Trust (HotSpot 2016).
2016.
*/
#include <stdio.h>
#include <stdlib.h>
@jboockmann
jboockmann / upload2newGitlabRepo.sh
Last active February 17, 2019 14:47
For each folder do: init as local git repository, create and push repository to gitlab
for d in */ ; do
cd "$d"
git init
git add .
git commit -m "init"
echo "${d::-1}"
git push --set-upstream git@gitlab.com:XXX/"${d::-1}".git master
cd ..
done
@jboockmann
jboockmann / README.md
Last active February 17, 2019 14:45
multarraycopy.c
$ gcc -Wall -Werror multarraycopy.c
$ ./a.out
[0] => 2
[1] => 4
[2] => 6
[3] => 8
[4] => 10
@jboockmann
jboockmann / Dockerfile
Last active February 17, 2019 14:46
Minesweeper
FROM python:3
WORKDIR /usr/src/app
RUN pip install --upgrade pip
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY minesweeper.py ./
CMD [ "python", "./minesweeper.py" ]
@jboockmann
jboockmann / docker-insekta-docs.md
Last active February 17, 2019 14:44
Some docker commands for insekta
$ sudo docker run -v "$(pwd)":/root/insekta-docs -it debian /bin/bash 

$ sudo docker ps
....

$ sudo docker commit 20f2643b5d13

$ sudo docker images 
REPOSITORY TAG IMAGE ID CREATED SIZE
@jboockmann
jboockmann / aufgabe7.c
Last active February 17, 2019 14:37
EiAPS | WiSe-2017-2018
// WiSe-2017-2018
// Aufgabe 7c
// notwendige Programmbibliotheken einbinden (siehe printf und malloc/calloc)
#include <stdio.h>
#include <stdlib.h>
// struct zur Darstellung des Datums
struct Datum{
int tag;