Skip to content

Instantly share code, notes, and snippets.

{"@context":"http://schema.org","@type":"Recipe","author":"jo","name":"test","datePublished":"2018-03-12","description":"bla.","recipeIngredient":["1 Avocado", "150 g Basmatireis", "125 g Cherrytomaten", "½ Chili", "¼ TL Chilipulver", "¼ TL Chilis", "48 g Erdnüsse", "350 g festkochende Kartoffeln von REWE Regional", "3⅜ Frühlingszwiebeln", "15 g Frühlingszwiebeln", "¼ TL Garam Masala", "½ TL gemahlene Kurkuma", "½ TL gemahlener Koriander", "½ TL gemahlener Kreuzkümmel", "¼ TL geräuchertes Paprikapulver", "¼ TL getrockneter Oregano", "¾ TL Harissa Gewürzpaste", "5 g Ingwer", "Joghurt", "¾ Karotte", "1 Karotten", "125 g Kichererbsen (vorgegart, abgetropft)", "1 TL Kitchen Stories Viva la Spice Gewürzmischung (optional)", "1 Zehe Knoblauch", "2 Zehen Knoblauch", "½ Zehe Knoblauch", "15 g Koriander", "5 g Koriander", "8 g Koriander", "5 g Koriander", "¾ TL Kreuzkümmelsamen", "½ TL Kurkuma", "½ Limette", "2 Limetten", "1 Lorbeerblatt", "175 g Mais aus der Dose", "5 g Minze", "8 g Minze", "10 g Minze", "4 EL
@willnix
willnix / usb-android-emulator-ubuntu.md
Last active May 14, 2020 18:08 — forked from Alabate/usb-android-emulator-ubuntu.md
Use custom USB device with Android emulator by using custom built kernel on Ubuntu 18.04

Use custom USB device with Android emulator by using custom built kernel on Ubuntu 18.04

The android emulator doesn't support all usb devices because they are disabled in the kernel. So we need to build it with another configuration. My goal was to build the same version as it was before, but with just configuration modifications.

Find current android version

Start the emulator without modifications, go into

Configuration > System > About emulated device > Android version

@willnix
willnix / hashUnencodedChars.py
Created July 4, 2019 23:15
Python version of hashUnencodedChars
#!/usr/bin/env python3
import hashlib
def hash_unencoded_chars(s: str) -> hashlib.sha256:
""" hash_unencoded_chars - emulates com.google.common.hash.Hashing.sha256().hashUnencodedChars(s)
Google's java library guava comes with the hashUnencodedChars function
which yields different results than most other language's hashing functions.
This function should be compatible.
"""
@willnix
willnix / custom_ftp.py
Created May 17, 2019 11:22
Simple FTP server that accepts any credentials and logs the to stdout
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.log import logger
HOMEDIR = "/var/ftp"
# Authorizer granting access to everyone and logging the credentials
class LoggingAuthorizer(DummyAuthorizer):
def validate_authentication(self, username, password, handler):
@willnix
willnix / custom_http.py
Last active May 17, 2019 11:14
Slightly customized Python 3 HTTP Server
#!/usr/bin/env python3
from http.server import SimpleHTTPRequestHandler, HTTPServer
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_GET(self):
'''
Print request and call SimpleHTTPRequestHandler.do_GET()
to serve static files
'''
print(">"+"-"*40+"<")
@willnix
willnix / blurma.js
Created March 20, 2017 13:59
BlurMa
// ==UserScript==
// @name BlurMa
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Blur latest Threema message preview
// @author Frieder Steinmetz
// @match https://web.threema.ch/*
// @grant none
// ==/UserScript==
@willnix
willnix / zombies2gpx.go
Last active April 22, 2016 13:48
Converts the JSON format used by "Zombies Run!" to GPX which can be imported in Runtastic.
package main
import (
"fmt"
"os"
"time"
"encoding/json"
"encoding/xml"
)
@willnix
willnix / keybase.md
Created November 12, 2014 16:05
keybase.md

Keybase proof

I hereby claim:

  • I am willnix on github.
  • I am willnix (https://keybase.io/willnix) on keybase.
  • I have a public key whose fingerprint is 5684 C0D8 2CBA 23F8 6586 46EA 9A53 2500 B675 2867

To claim this, I am signing this object:

@willnix
willnix / vortex0.go
Created March 26, 2013 23:52
vortex0
package main
import (
"bufio"
"encoding/binary"
"fmt"
"log"
)
type num [4]uint32
@willnix
willnix / Semtex5.go
Last active August 29, 2019 18:03
Semtex5 - Using TOR and its control signal NEWNYM to establish 10 connections from different IP addresses
package main
import (
"fmt"
"github.com/hailiang/gosocks"
"io"
"net"
"os"
"strings"
"time"