Skip to content

Instantly share code, notes, and snippets.

🏴
.

Jason M. json-m

🏴
.
Block or report user

Report or block json-m

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@json-m
json-m / spaceislit.py
Created Dec 13, 2018
top 5 posts for /r/space
View spaceislit.py
import requests
import json
count = 0
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36'
}
r = requests.get('https://www.reddit.com/r/space/top.json', headers=headers)
posts = json.loads(r.text)
View videojs-plugin-events-logger.js
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary
import videojs from 'video.js'
const Plugin = videojs.getPlugin('plugin')
const EVENTS = [
'loadstart',
'progress',
'suspend',
'abort',
'error',
You can’t perform that action at this time.