Live stream from your PS4 to a local computer running an RTMP server by intercepting the twitch.tv stream.
Requirements
- DD-WRT enabled Router (or router with iptables compatibility)
- nix Envirment
- nginx with the nginx-rtmp-module
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
<!DOCTYPE html> | |
<!-- By Jan Wrobel. See it working at: | |
http://mixedbit.org/blog/2013/02/10/random_walk_illustrated_with_d3.html | |
--> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Random walk</title> |
-- A Pandoc filter to use Pygments for Pandoc | |
-- Code blocks in HTML output | |
-- Nickolay Kudasov 2013 | |
-- Requires Pandoc 1.12 | |
import Text.Pandoc.Definition | |
import Text.Pandoc.JSON (toJSONFilter) | |
import Text.Pandoc.Shared | |
import Data.Char(toLower) | |
import System.Process (readProcess) |
import cStringIO | |
import requests | |
from xml.etree import cElementTree as ElementTree | |
url = 'http://climate.weather.gc.ca/climateData/bulkdata_e.html' | |
query = { | |
# Spelling of keys is case-sensitive at the URL-processor end | |
'timeframe': 1, | |
'stationID': 6831, # Sandheads | |
'format': 'xml', |
#!/bin/sh | |
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
-- another way of waiting until an app is running | |
on waitUntilRunning(appname, delaytime) | |
repeat until my appIsRunning(appname) | |
tell application "Messages" to close window 1 | |
delay delaytime | |
end repeat |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Terminal notifier | |
;; requires 'sudo gem install terminal-notifier' | |
;; stolen from erc-notifier | |
(defvar terminal-notifier-command (executable-find "terminal-notifier") "The path to terminal-notifier.") | |
; (terminal-notifier-notify "Emacs notification" "Something amusing happened") | |
(defun terminal-notifier-notify (title message) |
def add_cors_headers(response): | |
response.headers['Access-Control-Allow-Origin'] = '*' | |
if request.method == 'OPTIONS': | |
response.headers['Access-Control-Allow-Methods'] = 'DELETE, GET, POST, PUT' | |
headers = request.headers.get('Access-Control-Request-Headers') | |
if headers: | |
response.headers['Access-Control-Allow-Headers'] = headers | |
return response | |
app.after_request(add_cors_headers) |