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
  • 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.
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 June 10, 2017 03:04 — 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 November 1, 2019 06:18
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 January 8, 2020 01:23
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 January 8, 2020 08:10
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 / soundcloud_login.py
Last active November 8, 2022 15:59
Soundcloud login. retrieve access_token through reverse engineered web flow authentication.
View soundcloud_login.py
import time
import random
import requests
import sys
import getpass
import random
# signature generation
def signp(a, i, s, w, u, l, b, k, c, n, r, e, t):
d = '-'.join([str(mInt) for mInt in [a, i, s, w, u, l, b, k]])
@blackjack4494
blackjack4494 / viki_test.py
Last active June 28, 2021 06:12
Viki.com API Login
View viki_test.py
import requests
import sys
import getpass
import time
import hashlib
import hmac
import json
_API_QUERY_TEMPLATE = '/v4/%sapp=%s&t=%s&site=www.viki.com'
_API_URL_TEMPLATE = 'https://api.viki.io%s&sig=%s'
@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
View cheat_sheet.md

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