Skip to content

Instantly share code, notes, and snippets.

View YtvwlD's full-sized avatar

Niklas YtvwlD

View GitHub Profile
@YtvwlD
YtvwlD / Pipfile
Last active March 31, 2024 17:26
mpris2mqtt
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
mpris2 = "*"
paho-mqtt = "*"
dbus-python = "*"
pygobject = "*"
@YtvwlD
YtvwlD / .gitignore
Last active November 28, 2019 20:13
Stream the screen of your Android device to a Chromecast using only free software!
.mypy_cache
@YtvwlD
YtvwlD / Vagrantfile
Created June 28, 2019 18:09
NFS minimal example
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider "virtualbox" do |v|
v.memory = 256
end
config.vm.define "server" do |server|
server.vm.hostname = "server"
server.vm.network "private_network", ip: "10.0.0.10"
server.vm.provision "shell", inline: <<-SHELL
@YtvwlD
YtvwlD / test.py
Last active May 12, 2019 09:35
simple script to run tests for the nand2tetris course
#!/usr/bin/env python3
from pathlib import Path
from subprocess import run, PIPE, TimeoutExpired
from sys import argv
from collections import namedtuple
from queue import Queue
from typing import Iterator, List, Optional, Tuple, Union
import huepy
@YtvwlD
YtvwlD / mete-drinks-graph.py
Last active May 10, 2019 15:28
mete-drinks-graph
#!/usr/bin/python3
import requests
from json import JSONDecoder
import plotly
from datetime import datetime
from sys import argv
jsondec = JSONDecoder()
BASE_URL = "http://mete/api/v1/audits.json"
parameters = dict()
if "--user" in argv:
@YtvwlD
YtvwlD / README.md
Last active March 19, 2019 13:46
#dorfleaks
@YtvwlD
YtvwlD / Makefile
Last active September 7, 2018 19:01
.PHONY: tests
CFLAGS=-Wall -std=c99
TESTCFLAGS:=$(shell pkg-config --cflags --libs check)
#FILE=<datei>
main:
make -B CFLAGS="$(CFLAGS) main.c" $(FILE)
run: main
./$(FILE)
@YtvwlD
YtvwlD / apod-download.py
Last active June 30, 2018 20:40
download NASA's Astronomy Picture of the Day
#!/usr/bin/env python3
from os import environ, rename
from os.path import expanduser
from urllib.request import urlretrieve
from bowshock.apod import apod
# you might want to change these values
DEST_FILE = expanduser("~/.cache/kscreenlocker_greet/plasma_engine_potd/apod")
@YtvwlD
YtvwlD / base64conv.py
Last active April 6, 2018 17:22
base64 convergence
#!/usr/bin/env python3
from base64 import b64encode
from time import sleep
from abc import abstractmethod
import curses
values = [
{
"input": b"a",