This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:var u='content.guardianapis.com';window.open((window.location.toString().split('#')[0].split('?')[0] + '.json?api-key=hackedio&show-fields=all&show-tags=all&show-media=all').replace('www.guardian.co.uk', u).replace('m.guardian.co.uk', u)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ruby | |
| require "json" | |
| infile = "antarctica_hits" | |
| lines = File.readlines infile | |
| parsed_lines = lines.map do |line| | |
| line = line.gsub(/2014-02-28T12-ip-10.*\.internal:/, "") | |
| JSON.parse(line) rescue next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'curb' | |
| require 'json' | |
| require 'sinatra' | |
| last_poll = Time.now | |
| poll_interval = 10 | |
| borked_videos = [] | |
| EXPECT_ENCODINGS = ['video/mp4','video/3gp:small','video/3gp:large','video/m3u8','video/webm'] | |
| Thread.abort_on_exception = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(['angular', 'lodash'], function(angular, _) { | |
| 'use strict'; | |
| var mod = angular.module('guardianCardServices', []); | |
| // Matches on any Guardian content URL | |
| // Higher priority services (e.g. video embed) should be tried first | |
| var guCardUriPattern = /https?:\/\/www\.theguardian\.com\/.*\/\d{4}\/.*/; | |
| // var guCardEmbedApiHost = "http://embed.theguardian.com/oembed/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "twitter" | |
| require "curb" | |
| require "pp" | |
| require "json" | |
| require "opengraph_parser" | |
| puts "Authenticating..." | |
| client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = "foo" |
OlderNewer