Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sebastian Golasch asciidisco

🏠
Working from home
View GitHub Profile
@asciidisco
asciidisco / drm_idk.md
Last active Sep 19, 2020
EME? CDM? DRM? CENC? IDK!
View drm_idk.md

Title

EME? CDM? DRM? CENC? IDK!

Abstract

Once there was the <video/> tag, but content distributors decided it wasn't enough. They wanted more - more power, more protection, more control, more features. So, Encrypted Media Extensions were born & Digital Rights Management appeared in our browsers.

@asciidisco
asciidisco / add.m3u8
Created Jul 24, 2017
Weitere IPTV Kanäle (International, Lokal, Österreich)
View add.m3u8
#EXTM3U
#EXTINF:0,Adult Swim
http://adultswimhls-i.akamaihd.net/hls/live/238460/adultswim/main/1/master.m3u8
#EXTINF:0,JUCE TV
http://acaooyalahd2-lh.akamaihd.net/i/TBN03_delivery@186241/master.m3u8
#EXTINF:0, NASA TV
http://iphone-streaming.ustream.tv/uhls/6540154/streams/live/iphone/playlist.m3u8
#EXTINF:0,CBSN
http://www.cbsnews.com/common/video/dai_prod.m3u8
#EXTINF:0,CBN News
@asciidisco
asciidisco / get_genre_contents_nfx.py
Created Apr 18, 2017
Get contents of netflix genres
View get_genre_contents_nfx.py
from json import dumps
from re import compile as recompile
from requests import session as resession
ANIME_CATEGORIES = {
'Anime': 7424,
'Anime Action': 2653,
'Anime Comedies': 9302,
'Anime Dramas': 452,
'Anime Fantasy': 11146,
@asciidisco
asciidisco / gist:5c0020f25d7d9dccc5c5
Created Mar 11, 2016
npm sass, autoprefixer, minifier, sourcemaps
View gist:5c0020f25d7d9dccc5c5
"scripts" {
"styles:dev": "node-sass --source-map-embed --follow --output-style expanded src/styles/main.scss | postcss -u autoprefixer -u cssnano -o public/main.css --map file"
}
@asciidisco
asciidisco / dalek_flocke.js
Created Aug 6, 2013
Many screenshots from different pages in different resolutions
View dalek_flocke.js
module.exports = {
'A lot of screenshots': function (test) {
var resolutions = [{width: 1280, height: 1024}, {width: 1024, height: 768}, {width: 800, height: 600}];
var pages = ['http://facebook.com', 'http://twitter.com', 'http://dalekjs.com'];
resolutions.forEach(function (res) {
pages.forEach(function (page) {
test.open(page)
.resize(res)
@asciidisco
asciidisco / index.js
Last active Mar 15, 2018
UPNP discovery
View index.js
var ssdp = require('node-ssdp-lite');
var request = require('request');
var _ = require('lodash');
var parseString = require('xml2js').parseString;
var client = new ssdp();
var endpoints = {};
var locationFilter = function (msg) {
var start = msg.search('LOCATION:') + 'LOCATION:'.length;
View webplatform_webdriver.md

This tutorial will walk you through the basic setup of your own WebDriver server/client system, it will provide you with the basic knowledge on how WebDriver works, but aims not be a full blown browser testing solution etc.

WebDriver in a nutshell

WebDriver is a W3C editors draft for writing automated tests of websites. It aims to mimic the behaviour of a real user, and as such interacts with the HTML of the application.

All implementations of WebDriver that communicate with the browser use the JSON WireProtocol. This wire protocol defines a RESTful web service using JSON over HTTP.

@asciidisco
asciidisco / your_cyclomatic.md
Created Oct 29, 2017
Your cyclomatic complexity is so 1.9,76
View your_cyclomatic.md

Title

Your cyclomatic complexity is so 1.9,76

Abstract

In 1976 Thomas J. McCabe, Sr. developed metrics to determine the complexity of the code we write. One year later Maurice Howard Halstead formulated the so called Halstead metric to achieve something similar. 30 years later, we still rely on those abstract numbers that describe the complexity of our code, but do these naked numbers really tell us the truth about our code?

@asciidisco
asciidisco / nha.md
Last active Oct 20, 2017
Node homeautomation
View tele5.m3u8
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000
http://zh2-5-hls-live.zahs.tv/DE_tele5-live-1500-14D1E1FC67907FD7-5568685CC01CE0D0.m3u8?csid=14D1E1FC67907FD7-5568685CC01CE0D0&encryption=0&maxrate=1500&sig=03462ac59eef4c75ea7b898b541b44b8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=900000
http://zh2-5-hls-live.zahs.tv/DE_tele5-live-900-14D1E1FC67907FD7-5568685CC01CE0D0.m3u8?csid=14D1E1FC67907FD7-5568685CC01CE0D0&encryption=0&maxrate=1500&sig=1182a920277cb5049c333d9886cd24a1
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000
http://zh2-5-hls-live.zahs.tv/DE_tele5-live-600-14D1E1FC67907FD7-5568685CC01CE0D0.m3u8?csid=14D1E1FC67907FD7-5568685CC01CE0D0&encryption=0&maxrate=1500&sig=6cc2e44edfcc05e9ec477a26d6c9c179