Skip to content

Instantly share code, notes, and snippets.

Avatar
🍌
I am here to bring bananas to the people

Tom-Oliver Heidel blackjack4494

🍌
I am here to bring bananas to the people
  • Bremen/Hamburg, Germany
View GitHub Profile
@blackjack4494
blackjack4494 / rest.py
Created Jun 10, 2017 — forked from tliron/rest.py
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
View rest.py
#!/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 Jun 10, 2017 — forked from jdkanani/Server.py
Python SimpleHTTPServer : Routing sample
View Server.py
#!/usr/bin/env python
import os
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
ROUTES = [
('/', '/var/www/doc-html')
]
class MyHandler(SimpleHTTPRequestHandler):
View FirstPersonController.cs
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 Nov 1, 2019
Research about the internal Soundcloud API. Endpoints etc.
View Soundcloud API-V2.md

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 Jan 8, 2020
Sample Output from custom mtr (mtr-ext)
View gist:b54ccb55502a3e4d7c04c112188f4048
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 Jan 8, 2020
different ways to download files with pure js. only tested with chrome!
View blobba.html
<!--
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>
@blackjack4494
blackjack4494 / cheat_sheet.md
Created Sep 16, 2020
My very own VSC / vscode (Visual Studio Code) cheat sheet by theidel - Windows Edition
View cheat_sheet.md

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

@blackjack4494
blackjack4494 / conv.py
Created Sep 30, 2020
Javascript toString(16) Python equivalent
View conv.py
def _num2chr(self, num):
return hex(num)[2:]
View mtvnetwork.md

In order to be able to download videos from mtv (no matter the country and various other sites of their network) we need the mgid.

One of the easiest ways is the following:
For com https://www.mtv.com/feeds/triforce/manifest/v8?url=http%3A%2F%2Fwww.mtv.com%2Fepisodes%2F4iqsts%2Frevenge-prank-the-prank-that-hits-the-jackpot-season-1-ep-16
For de https://www.mtv.de/feeds/triforce/manifest/v8?url=http%3A%2F%2Fwww.mtv.de%2Ffolgen%2Fhxzmi4%2Fgeordie-shore-die-neue-chloe-S21-F7 and so on.

Note that url=http (!) if you try to use https it won't work for now but MTV is about to change their system to using https.