Skip to content

Instantly share code, notes, and snippets.

Niklas YtvwlD

Block or report user

Report or block YtvwlD

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@YtvwlD
YtvwlD / Vagrantfile
Created Jun 28, 2019
NFS minimal example
View Vagrantfile
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
simple script to run tests for the nand2tetris course
View test.py
#!/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 / apod-download.py
Last active Jun 30, 2018
download NASA's Astronomy Picture of the Day
View apod-download.py
#!/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 Apr 6, 2018
base64 convergence
View base64conv.py
#!/usr/bin/env python3
from base64 import b64encode
from time import sleep
from abc import abstractmethod
import curses
values = [
{
"input": b"a",
@YtvwlD
YtvwlD / index.html
Last active Oct 20, 2017
display pixels in a canvas
View index.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pixelflut</title>
<link rel="stylesheet" href="style.css" />
<script src="pixelflut.js"></script>
</head>
@YtvwlD
YtvwlD / maurudor-chromecast.py
Last active Feb 6, 2018
Puts Maurudor.de to a Chromecast.
View maurudor-chromecast.py
#!/usr/bin/env python3
import pychromecast
from pychromecast.controllers.media import MediaController
from sys import argv
from random import random
from time import sleep
print("Searching for devices...")
@YtvwlD
YtvwlD / README.md
Last active Sep 27, 2017
Restores encrypted Titanium Backups on rooted Android phones.
View README.md

tb_restore

This script can restore encrypted Titanium Backups to a rooted Android phone.

Install

You'll need a working Python interpreter and TiBUdecrypter.

The easiest way to achieve this is to install Termux and then run this:

View mpris2mqtt.py
#!/usr/bin/env python3
# DEBUG
import os
DEBUG = "DEBUG" in os.environ
print("Debugging: {} {}".format(DEBUG, "(You might want to set DEBUG.)" if not DEBUG else ""))
# DBUS (apt install python3-dbus)
from dbus.mainloop.glib import DBusGMainLoop
View Makefile
.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)
You can’t perform that action at this time.