Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Probst-Ranly chrisprobst

View GitHub Profile
@chrisprobst
chrisprobst / main.java
Created Oct 30, 2019
Strive SDK Integration
View main.java
package io.strivetech.androidsdk;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.devbrackets.android.exomedia.listener.OnPreparedListener;
import com.devbrackets.android.exomedia.ui.widget.VideoView;
import p2pdnsdk.P2pdnsdk;
View NGINX Config 2
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'https://stream-cr7.net';
add_header 'Vary' 'Origin';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
View NGINX Config
server {
listen 443;
server_name cdn1.stream-cr7.live;
ssl_certificate /etc/letsencrypt/live/cdn1.stream-cr7.live/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cdn1.stream-cr7.live/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
View gist:975f7f05f9fa0773e72ab046ae421ffb
<!DOCTYPE html>
<!--
*
* Copyright (C) 2016, bitmovin GmbH, All Rights Reserved
*
* Created on: 2015-07-25 11:35:04
* Author: bitmovin GmbH <dash-player@bitmovin.com>
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
View gist:cf0ac2b1aa49c9a47d309088ef32477c
package main
import (
"bytes"
"encoding/base64"
"encoding/json"
"io/ioutil"
"log"
"net/http"
@chrisprobst
chrisprobst / gist:f847fd058548be88b8059a99344a130c
Created May 19, 2016 — forked from sl4m/gist:5091803
create self-signed certificate for localhost
View gist:f847fd058548be88b8059a99344a130c
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
View gist:670ad8043c45b92e9774
server {
listen 8443 ssl;
server_name kr0e.no-ip.info;
add_header Strict-Transport-Security "max-age=31536000";
ssl_certificate /Users/chrisprobst/.ssh/certificate/cert.pem;
ssl_certificate_key /Users/chrisprobst/.ssh/certificate/key.pem;
View twitch_live_url.py
import requests
import json
import re
import argparse
import random
import m3u8
USHER_API = 'http://usher.twitch.tv/api/channel/hls/{channel}.m3u8?player=twitchweb' +\
'&token={token}&sig={sig}&$allow_audio_only=true&allow_source=true' + \
'&type=any&p={random}'
View gist:cca67440ad4ef4c10073
var io = require('socket.io')();
var uuid = require('node-uuid');
io.on('connection', function(socket){
socket.emit('hello', 'world')
});
io.listen(1337)
var socket = require('socket.io-client')('http://kr0e.no-ip.info:1337');