Skip to content

Instantly share code, notes, and snippets.

View motoom's full-sized avatar

Michiel Overtoom motoom

  • Groningen, Netherlands
View GitHub Profile
import requests
import json
d = json.loads(requests.get("https://soccerscanner.net/livescore.json").text)
print(d[0]["home_team"] + " vs " + d[0]["away_team"])
@motoom
motoom / corsapiserver-test.html
Created June 2, 2018 14:40
CherryPy API server able to serve JSON to webbrowsers using CORS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test API</title>
</head>
<body>
<h1>Test API using CORS</h1>
<p>Result:</p>
<p id="result"></p>
@motoom
motoom / MetaObject.php
Created August 31, 2011 13:44 — forked from CHH/MetaObject.php
PHP does Meta Programming too! (Requires PHP 5.4)
<?php
namespace CHH;
trait MetaObject
{
protected static $metaClass;
static function setMetaClass(MetaClass $metaClass)
{
print 5+6