This file contains 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 python | |
import urllib | |
import urllib2 | |
try: | |
import json | |
except ImportError: | |
try: | |
import simplejson as json | |
except ImportError: | |
raise ImportError("Need a json decoder") |
This file contains 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
// Call API to get a video oEmbed JSON response | |
var url = escape('http://vimeo.com/9503416'); | |
var api_url = 'http://api.embed.ly/1/oembed?url=' + url + '&callback=?'; | |
//jQuery JSON call | |
$.getJSON( api_url, function(json) { | |
var html = json.html; | |
$('#videodiv').html(html); | |
}); |
This file contains 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
# This is an implementation using python-oembed with api.embed.ly | |
# python-oembed http://code.google.com/p/python-oembed/ | |
import oembed | |
# Embed.ly Multi Provider API Endpoint | |
OEMBED_ENDPOINT = 'http://api.embed.ly/oembed/api/v1' | |
# URL Schemes Supported --- complete list maintained | |
# http://api.embed.ly/static/data/embedly_regex.json |
This file contains 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
import requests | |
import sys | |
for q in range(1,3): | |
for i in range(1,10000): | |
response = requests.post('http://apply.embed.ly/%s' % q, data={'answer': str(i)}) | |
if response.status_code == 302: | |
print 'question: %, answer: %s' % (q, i) | |
sys.exit(0) |
This file contains 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
{ | |
"Embed": { | |
en : 'Embed', | |
es : 'Insertar', | |
tr : 'Embed', | |
de : 'Einbetten', | |
fr : 'Ins\u00E9rer' | |
}, | |
"Share": { | |
de: "Teilen", |
This file contains 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
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile | |
# Install dependencies only when needed | |
FROM node:16-alpine AS deps | |
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
RUN apk add --no-cache libc6-compat | |
WORKDIR /app | |
COPY package.json package-lock.json ./ | |
RUN npm ci | |
# Rebuild the source code only when needed |