Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Ferdinand Mütsch muety

🤓
View GitHub Profile
@muety
muety / whatsapp_to_telegram.py
Last active Sep 16, 2021
A script to help you migrate your whole WhatsApp chat history with a person to Telegram
View whatsapp_to_telegram.py
#!/bin/python
import os
import re
import shutil
# A script to help you migrate your whole WhatsApp chat history with a person to Telegram
# Instructions
# 1. Install "Backup WhatsApp Chats" extenstion to Chrome
@muety
muety / track.php
Created Jun 25, 2021
OwnTracks receiver script
View track.php
<?php
$data = file_get_contents('php://input');
$json = json_decode($data);
if ($json->_type !== 'location') {
return;
}
$db = new mysqli('localhost:3306', 'otr', 'sshhh', 'otr');
if ($db->connect_error) {
@muety
muety / localssh.sh
Created Dec 3, 2020
Reverse tunneling to localhost using SSH (ngrok alternative)
View localssh.sh
#!/bin/bash
# Requires 'GatewayPorts clientspecified' to be set in /etc/ssh/sshd_config
HOST="muetsch.io"
REMOTE_PORT="8080"
REMOTE_BIND_V4="127.0.0.1"
PROXY_URL="https://local.muetsch.io"
echo -e "----------- localssh -----------"
View vggfaces_finetuned_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View vggfaces_bottleneck_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View inspection.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View custom_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@muety
muety / TwoSum.scala
Created Mar 27, 2019
LeetCode TwoSum Solution Scala
View TwoSum.scala
// https://leetcode.com/problems/two-sum
object TwoSum {
def apply(nums: Array[Int], target: Int): Array[Int] = {
nums.view.zipWithIndex.map(x => {
val el = nums.view.zipWithIndex.drop(x._2 + 1).collectFirst {
case y if y._1 + x._1 == target => y
}
Array(Option(x), el)
}).collectFirst {
View aoc_2018_day1.scala
import scala.io.Source
object Advent {
def main(args: Array[String]): Unit = {
val data = Source.fromFile("data/day1.txt").getLines.map(_.toInt).toList
println(f"Part 1: ${data.sum}")
/* Can someone help me get this second part a littler more Scala-like (more functional, less procedural)? Please let me know! */
var seen: Set[Int] = Set()
@muety
muety / vpn.md
Created Nov 17, 2018
Use FritzBox IPSec VPN on Ubuntu 18.04
View vpn.md

FritzBox VPN on Ubuntu 18.04

  • Configure VPN for a user on your FritzBox and don't forget to show the pop-up including your credentials etc. afterwards. Also make sure you check "Allow access from internet".
  • sudo apt install vpnc network-manager-vpnc
  • Create file /etc/vpnc/vpn.conf, paste the following content and insert your credentials etc.
IPSec gateway yourfritzboxhere.myfritz.net
IPSec ID your_user
IPSec secret your_preshared_key