Skip to content

Instantly share code, notes, and snippets.

@artgibson
artgibson / Dockerfile
Created October 10, 2022 23:40 — forked from malteneuss/Dockerfile
Nextjs + Prisma DB (query and migrations) in Docker
# 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
{
"Embed": {
en : 'Embed',
es : 'Insertar',
tr : 'Embed',
de : 'Einbetten',
fr : 'Ins\u00E9rer'
},
"Share": {
de: "Teilen",
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 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
// 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);
});
#!/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")