Skip to content

Instantly share code, notes, and snippets.

View adammw's full-sized avatar
👨‍💻
Hacking on Kubernetes Platform @ Zendesk

Adam Malcontenti-Wilson adammw

👨‍💻
Hacking on Kubernetes Platform @ Zendesk
View GitHub Profile
import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib, sys, os, re, threading
from hashlib import md5
# Add our resources/lib to the python path
try:
current_dir = os.path.dirname(os.path.abspath(__file__))
except:
current_dir = os.getcwd()
1
00:00:00,170 --> 00:00:00,200
cc608:AAAAJsz//JQg/YCA/wow/oj//oz+/pkY/gAA/g4f/hGX/sAA/k4A/gAA
2
00:00:00,200 --> 00:00:00,230
cc608:AAAACML//JQg/YCA
THREE.ImageUtils.crossOrigin = true;
Physijs.scripts.worker = 'https://rawgit.com/chandlerprall/Physijs/master/physijs_worker.js';
Physijs.scripts.ammo = 'https://rawgit.com/chandlerprall/Physijs/master/examples/js/ammo.js';'
var renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.shadowMapEnabled = true;
renderer.shadowMapSoft = true;
document.body.appendChild( renderer.domElement );
<!doctype html>
<!--[if lte IE 9 ]><html class="ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html><!--<![endif]-->
<head><script type="text/javascript">window.sp_appLogInit = new Date().getTime();</script>
<meta name="sp-app-version" content="4.0.3" />
<base href="https://play.spotify.edgekey.net/apps/player/4.0.3/" />
<meta name="robots" content="noindex, nofollow" />
<link rel="stylesheet" href="https://play.spotify.edgekey.net/apps/api/1.36.1/css/main.css">
{
"id": 3293395855001,
"name": "2014 FORMULA 1 - SANTANDER BRITISH GRAND PRIX",
"adKeys": null,
"shortDescription": "Join Greg Rust and Alan Jones as they bring you all the qualifying action of the 2014 Formula 1 Santander British Grand Prix from Silverstone.",
"longDescription": null,
"creationDate": "1393978132110",
"publishedDate": "1402206144208",
"lastModifiedDate": "1404566211234",
"linkURL": null,
@adammw
adammw / server.js
Created July 17, 2014 12:29
Redirect test server
var express = require('express');
var app = express();
app.use(function(req, res, next) {
if (req.query.redirect) {
res.redirect(req.query.code || 302, req.query.redirect);
} else {
res.send(req.query.code || 200);
}
.ghx-issue {
padding-left: 22px !important;
padding-bottom: 0 !important;
}
.ghx-band-2 .ghx-issue-fields {
margin-top: -2px !important;
}
.ghx-issue-fields .ghx-type {
left: 5px !important;
top: 4px;
@adammw
adammw / facebook-anonymiser.js
Last active August 29, 2015 14:06
Remove names from Facebook posts and comments allow them to be screenshotted and posted to internet forums without exposing user identities.
(function() {
var hash = {};
var anonymise = function() {
// Handle links to user profiles, e.g. those shown when someone likes a post
Array.prototype.forEach.call(document.querySelectorAll('[data-hovercard*="user.php"], [data-hovercard*="hovercard.php"]'), function(hovercardLink) {
if (!hovercardLink.dataset.hovercard) return;
var id = /id=(\d+)/.exec(hovercardLink.dataset.hovercard)[1];
var hue = hash[id] = hash[id] || (Math.random() * 360);
hovercardLink.style.background = 'hsl(' + hue + ',55%,60%)';
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>