Skip to content

Instantly share code, notes, and snippets.

View leandro-ro's full-sized avatar

Leandro Rometsch leandro-ro

View GitHub Profile
@leandro-ro
leandro-ro / pdf_encrypt_and_ipfs_upload.py
Created June 16, 2020 10:24
Encrypt PDF and upload to IPFS - This script will 1. take the path of a file, 2. check if the path is valid, 3. encrypt the file based on the standard symmetric PDF encryption, 4. upload it to the public IPFS and 5. output IPFS hash + password
# created by Leandro Rometsch on 07.06.2020
# TU Darmstadt - Blockchain Praktikum 2020
# This script will 1. take the path of a file, 2. check if the path is valid, 3. encrypt the file based on the
# standard symmetric PDF encryptopn, 4. upload it to the public IPFS and 5. output IPFS hash + password
# Example usage:
# python3 encrypt_and_upload.py /home/Documents/some_document.pdf
#
# | ---------------------------------------------------------- |
@leandro-ro
leandro-ro / egyptMult.c
Created June 8, 2019 16:25
Egyptian multiplication in C
#include "stdio.h"
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
// by Leandro Rometsch
int main(int argc, char *argv[]) {
signed int a;
signed int b; // signed -> algo works with negative numbers
int result = 0;