I hereby claim:
- I am tomayac on github.
- I am tomayac (https://keybase.io/tomayac) on keybase.
- I have a public key whose fingerprint is 6897 81EF 64CF F41E 7497 C1B4 5A9B C2AC 857C 0A63
To claim this, I am signing this object:
| // namespaced my implementation of the RDFa | |
| // API using "LinkedData.API" to avoid confusion | |
| // with real (and correcter) implementations. | |
| LinkedData.API.data.setMapping( | |
| 'cc', | |
| 'http://creativecommons.org/ns#'); | |
| // capture @rel="license"... | |
| var licensedElements = LinkedData.API.getElementsByProperty('license'); | |
| // ...and @rel="cc:license" |
| # This is what I try: | |
| curl -i -X POST -d "text=dbpedia+spotlight+is+neat.&confidence=0.2&support=10" -H "Accept:application/json" -H "Content-Type:application/x-www-form-urlencoded" http://spotlight.dbpedia.org/rest/annotate | |
| # This is what I get: | |
| HTTP/1.1 415 Unsupported Media Type | |
| Date: Fri, 09 Sep 2011 06:46:25 GMT | |
| Transfer-Encoding: chunked | |
| Content-Type: text/plain | |
| # What is the correct "Content-Type" header if not "application/x-www-form-urlencoded"? |
| <html> | |
| <head> | |
| <title>navigator.getUserMedia() Demo</title> | |
| </head> | |
| <body> | |
| <h1>See yourself?</h1> | |
| If your browser supports | |
| <span style="font-family:monospace;">navigator.getUserMedia()</span> | |
| you should see yourself below. If you don't see yourself, try | |
| downloading the |
| var irc = require('irc'); | |
| var request = require('request'); | |
| var express = require('express'); | |
| var http = require('http'); | |
| var app = express(); | |
| var server = http.createServer(app); | |
| // IRC details for the recent changes live updates | |
| var IRC_SERVER = 'irc.wikimedia.org'; | |
| var IRC_NICK = 'YOUR_APP_NAME_HERE'; |
| // Browse through your photo collection page-by-page, | |
| // each time pasting the script in the console. | |
| // Then save images one-by-one, or just "Save as" > "Web page complete". | |
| // The alt attribute contains the original tweet text. | |
| // License: CC0. Author: Thomas Steiner (tomayac). | |
| var images = []; | |
| Array.prototype.forEach.call(document.querySelectorAll('div[class~="user-photo"] a img'), function(img, i) { | |
| img.src = /.*?\/thumb\/.*?/g.test(img.src) ? img.src.replace('/thumb/', '/large/') : img.src; | |
| images[i] = '<img src="' + img.src + '" alt="' + img.alt.replace(/"/g, '"')+ '"/>'; | |
| }); |
| /** | |
| * @author Thomas Steiner ([email protected]) | |
| * @license CC0 1.0 Universal (CC0 1.0) | |
| * | |
| * Provides a simple key-value storage API modeled closely after | |
| * the localStorage API in Web browsers, but tailored to AdWords Scripts. | |
| * AdWords Scripts, due to execution time limits published at | |
| * https://developers.google.com/adwords/scripts/docs/limits, | |
| * forces users to store the state of a given script using either labels | |
| * (https://developers.google.com/adwords/scripts/docs/tips#labels), or |
| // Full source | |
| var source = new EventSource('http://wikipedia-edits.herokuapp.com/sse'); | |
| var languages = {}; | |
| var avgDeltas = {}; | |
| source.addEventListener('message', function(e) { | |
| var edit = JSON.parse(e.data); | |
| if (!languages[edit.language]) { | |
| languages[edit.language] = []; | |
| } |
I hereby claim:
To claim this, I am signing this object:
| // Test at http://www.meetup.com/Google-Developer-Group-Hamburg/events/222392017/ | |
| document.querySelector('#rsvp-list').querySelectorAll('li') | |
| [ | |
| Math.floor( | |
| Math.random() * | |
| document.querySelector('#rsvp-list').querySelectorAll('li').length | |
| ) + 1 | |
| ].style.backgroundColor = | |
| 'rgb(' + | |
| (Math.floor(Math.random() * 256)) + ',' + |
| 'use strict'; | |
| var async = require('async'); | |
| var request = require('request'); | |
| var ExpontentialSmoothingStream = require('exponential-smoothing-stream'); | |
| var numbers = require('numbers'); | |
| var geolib = require('geolib'); | |
| var util = require ('./util.js'); |