Skip to content

Instantly share code, notes, and snippets.

View blackjack4494's full-sized avatar
🍌
I am here to bring bananas to the people

Tom-Oliver Heidel blackjack4494

🍌
I am here to bring bananas to the people
  • Hamburg/Bremen, Germany
View GitHub Profile
@blackjack4494
blackjack4494 / rest.py
Created June 10, 2017 02:42 — forked from tliron/rest.py
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
#!/usr/bin/env python
'''
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
Features:
* Map URI patterns using regular expressions
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST)
* All responses and payloads are converted to/from JSON for you
@blackjack4494
blackjack4494 / Server.py
Created June 10, 2017 03:04 — forked from jdkanani/Server.py
Python SimpleHTTPServer : Routing sample
#!/usr/bin/env python
import os
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
ROUTES = [
('/', '/var/www/doc-html')
]
class MyHandler(SimpleHTTPRequestHandler):
using System;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Utility;
using Random = UnityEngine.Random;
namespace UnityStandardAssets.Characters.FirstPerson
{
[RequireComponent(typeof (CharacterController))]
[RequireComponent(typeof (AudioSource))]
@blackjack4494
blackjack4494 / Soundcloud API-V2.md
Last active November 1, 2019 06:18
Research about the internal Soundcloud API. Endpoints etc.

Soundcloud API-V2

Introduction

The Soundcloud API-v2 is an internal API used by Soundcloud. It is not intended to be used by third party apps. Even though it is against their ToS to use it. They stated on twitter that is usable in third party apps without being in fear of a ban.

The base url is:

api-v2.soundcloud.com/

But before you can use any of these endpoints you need to get a client_id otherwise none of your requests will actually get a response.

@blackjack4494
blackjack4494 / gist:b54ccb55502a3e4d7c04c112188f4048
Created January 8, 2020 01:23
Sample Output from custom mtr (mtr-ext)
root@ffm1:/home/mtr-web-dev# ./mtr -p -c 300 google.com
1 [REDACTED] 0 1 1 0.3 0.3 0.3 0.3 0.0 0.3 0.0 0.0 0.0 0.0
2 2001:1608:0:16::1 0 1 1 0.3 0.3 0.3 0.3 0.0 0.3 0.0 0.0 0.0 0.0
3 2001:1608:0:16::2 0 1 1 0.4 0.4 0.4 0.4 0.0 0.4 0.0 0.0 0.0 0.0
4 2003:0:130c:8010::1 0 1 1 0.6 0.6 0.6 0.6 0.0 0.6 0.0 0.0 0.0 0.0
6 2003:0:1304:8013::2 0 1 1 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0
7 2001:4860:0:11e2::2 0 1 1 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0
8 2001:4860::c:4000:f873 0 1 1 1.3 1.3 1.3 1.3 0.0 1.3 0.0 0.0 0.0 0.0
9 2001:4860::c:4001:5c5 0 1 1 13.8 13.8 13.8 13.8 0.0 13.8 0.0 0.0 0.0 0.0
10 2001:4860::c:4001:ec6 0 1 1 12.5 12.5 12.5 12.5 0.0 12.5 0.0 0.0 0.0 0.0
@blackjack4494
blackjack4494 / blobba.html
Last active January 8, 2020 08:10
different ways to download files with pure js. only tested with chrome!
<!--
http://jsfiddle.net/koldev/cW7W5/
Will most likely work with big files.
Should be unlimited in Firefox. Chrome is a bit more complex basically you can use 10% of your max hard drive space.
BE CAREFUL! DOWNLOAD WILL INSTANTLY TRIGGER!!
-->
<!doctype html>
<html lang="de">
<body>
<script>
76a6c65c5ea762046bd749a2e632ccbb
@blackjack4494
blackjack4494 / cheat_sheet.md
Created September 16, 2020 09:05
My very own VSC / vscode (Visual Studio Code) cheat sheet by theidel - Windows Edition

Ctrl + g : type in number - Jump/Go to line (n)
Alt + &larr; : _ - Navigate backwards
Alt + &rarr; : _ - Navigate forward

@blackjack4494
blackjack4494 / conv.py
Created September 30, 2020 00:07
Javascript toString(16) Python equivalent
def _num2chr(self, num):
return hex(num)[2:]
@blackjack4494
blackjack4494 / readme.md
Created October 23, 2020 23:21
[German] Regarding youtube-dl DMCA takedown - Nutzerfrage an WBS

Hallo, eventuell haben es einige von euch schon mitbekommen, dass youtube-dl's Quellcode [1] und quasi alle Kopien und Abwandlungen (forks) auf GitHub aufgrund eines DMCA takedown notice [2] der RIAA entfernt wurde. Einige Projektbetreuer (maintainer) wurden bereits abgemahnt, obwohl sie teilweise länger und scheinbar nichts mit dem vermeintlichen Code zu tun hatten [3]. Ich hatte ebenso einen Fork names youtube-dlc, der ebenso entfernt wurde. Allerdings habe ich - glücklicherweise - keine Abmahnung erhalten. Man sollte auch wissen, was youtube-dl überhaupt ist. Es ist ein Medien Downloader der ursprünglich für YouTube entwickelt wurde, aber im Laufe der Jahre Unterstützung für über 750 weitere Seiten eingepflegt hat. Dazu muss man sagen, dass an keiner Stelle jemals Kopierschutzmechanismen wie beispielswiese DRM umgegangen oder gebrochen wurden! Das ist auch der Grund warum man beispielsweise keine Videos von Netflix und co sowie Lieder von Spotify herunterladen kann, wobei zur Anmerkung es möglich WÄRE au