Skip to content

Instantly share code, notes, and snippets.

View famoser's full-sized avatar
:octocat:
Exploring internet voting & pdf generation

Florian Moser famoser

:octocat:
Exploring internet voting & pdf generation
View GitHub Profile
@famoser
famoser / RunOracleDB.MD
Created July 21, 2023 07:29
Run Spring Integration tests on Oracle DB using docker

Run Oracle DB locally

It is surprisingly hard to get spring integration tests running on an oracle DB. So here I'll document how.

Note that I have limited knowledge about Oracle DBs; the only target of this guide is to get it working somehow. If you are looking for a stable / sensible setup, you unfortunately need to look somewhere else (and then tell me in the comments!).

The docker image

First, choose the docker image of the version of interest. You can find those here: https://container-registry.oracle.com/

@famoser
famoser / gource.sh
Created July 26, 2021 12:14
gource to mp4
gource -s 1 -1280x720 --auto-skip-seconds .5 --multi-sampling --stop-at-end --hide mouse,progress --file-idle-time 0 --title "famoser/pdf-generator" --output-ppm-stream - --output-framerate 30 | ffmpeg -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K movie.mp4 && ffmpeg -i movie.mp4 -b:v 3048780 -vcodec libx264 -crf 24 output.mp4
@famoser
famoser / hci_learning.lua
Last active December 8, 2017 16:29
script for a Myo device to control a presentation using own guestures
scriptId = 'HCI Exercise - PowerPoint Connector - Extended Example'
scriptDetailsUrl = ''
scriptTitle = 'HCI - PowerPoint Connector - Trained'
-- -------------------------- HCI 2017 EXERCISE ----------------------
-- Lowis Engel, Christian Knabenhans, Florian Moser
-- ========================== COMMANDS ==========================
-- Fist -> Spread Enter training phase, center the arm
-- Spread Begin new data acquisition
-- Fist Go on to train next gesture
#include <stdio>
#include <vector>
#include <Eigen>
int initializeABunch(MatrixXd &A)
{
int n = 2;
A = MatrixXd::Zero(n, n);
A = MatrixXd::Random(n, n);
A = MatrixXd::Identity(n, n);
@famoser
famoser / delete-dir.php
Created September 25, 2016 11:04
zip utilities php
<?php
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object);
}
}
reset($objects);
@famoser
famoser / dbexport.php
Last active April 8, 2024 13:59
import / export php mysql database
<?php
/**
* Import a .sql file in a MySQL database
*
* Usage:
*
* 1. edit the configuration parameters here below and save
* 2. upload to the proper folder - usually /public_html - on your server
* 3. open a browser and execute with with an URL similar to:
* http://example.com/dbexport.php
@famoser
famoser / gulpfile.js
Last active December 16, 2016 16:38
combine & minimize frontend libraries
//MIT License, made by Florian Moser
//used together with bower, in a symfony project
//run "gulp" to build / minimize / copy all needed
//run "gulp clean" to clean up dist dir
//run "gulp watch" for browserSync
//run "rimraf node_modules" to remove the node_modules folder
//configure from
/* ###CONFIG START### */
@famoser
famoser / index.php
Last active August 13, 2016 12:13
Extract a zip file online. Cleans up afterwards (deletes zip and this script). Can be used as a fast and simple deploy option, without using too much bandwidth
<?php
$files = glob("*.zip");
if (count($files) == 0) {
echo "no zip files found";
exit;
}
else if (count($files) > 1) {
echo "multiple zip files found";
<?php
/**
* Created by PhpStorm.
* User: famoser
* Date: 19.05.2016
* Time: 10:00
* This file helps with imports
*/
function outputLine($line) {