Skip to content

Instantly share code, notes, and snippets.

View jeyemwey's full-sized avatar
👨‍🏫
Studying

Jannik jeyemwey

👨‍🏫
Studying
View GitHub Profile

re: Luca Android App

Huhu, ich wollte mal den Aufschlag machen, was den Code der Luca-App für Android angeht. Seht es als "persönliche, nicht-kommerzielle Betrachtung", oder so.

Kurz zu mir: Ich bin kein IT-Security-Mensch und ich habe keine formale Vorbildung in Informatik. Aber ich habe schon mal die eine oder andere Java-Anwendung von innen gesehen und weiß ungefähr, was möglich ist und worauf man achten sollte. Wenn ich was vergessen haben sollte, haut mich gerne an, und ich ergänze es.

Der Übersicht halber, in mehreren Abschnitten:

@jeyemwey
jeyemwey / main.go
Created September 22, 2020 07:43
Mumble-Fediverse-Bridge
package main
// This script pings a certain mumble server periodically (once per minute, per
// default). If the number of active connections changes from the last ping,
// the script will create a toot in Mastodon. It is therefore necassary to
// configure the `mastodonWriteEndpoint` and the `mastodonApiSecret`. Since a
// music bot resides in our mumble server, I set the default of connected users
// to one. This will only be respected the first time that the server starts.
//
// To execute the script, run `go run main.go` on a computer with configured go
'''
This is heavily inspired by http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ .
I had to modify the script for some college work at th-koeln.de
'''
import os
import exifread
import subprocess
def slug(str):
/**
* In jedem VEVENT gibt es eine Zeile "DESCRIPTION", in der der Kurs-Name drin
* steht. Ich bin in Kurs DAI 16/1, das bedeutet, dass alle Kurse im Array
* bleiben sollen, die den Substring "DAI" haben, aber jene mit "DAI 16/2"
* sollen rausfliegen. Das habe ich im Map-Teil mit den Regulären Ausdrücken
* versucht zu testen, es funktioniert aber noch nicht ganz, was man bei der
* Ausführung des Skriptes merkt.
*/
"use strict";
<?php
$ics_file = file_get_contents("hft.ics");
#$ics_file = file_get_contents("https://www1.hft-leipzig.de/hiscal/pub/hiscalStg.php?stg=dai16");
if (!$ics_file) {
http_response_code(404);
}
import java.util.HashMap;
public class CustomStringToInt {
/**
* Initialize the HashMap with the decimal numbers.
*
* @return The initialized HashMap.
*/
private static HashMap<Character, Integer> initCharToIntMap() {
// ==UserScript==
// @name Remove Brackets
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Replace ((($name))) with $name
// @author iamjannik.me
// @match https://tweetdeck.twitter.com/
// @grant none
// ==/UserScript==
@jeyemwey
jeyemwey / p
Last active August 29, 2015 14:17
This little function returns the first argument if it's set in the main application.
<?php
function p(&$var, $else = '') {
$var = (isset($var) && $var) ? $var : $else;
return $var;
}