Contributions welcome.
| Service | CLI? | Max Size | Direct Access | Files Expire? | Can Limit Download Count? | Password Protection | HTTPS |
|---|---|---|---|---|---|---|---|
| c-v.sh | curl -F |
4 GB | Yes | Yes, by Mister Alg. | No | No | Enforced |
| FileIO | Yes | 5 GB | Yes | Optionally | Fixed @ 1 | No | Yes |
| import json | |
| import csv | |
| from datetime import date | |
| import numpy as np | |
| from glob import glob | |
| from matplotlib import pyplot as plt | |
| join_date = date(2017, 8, 3) | |
| path_to_package_directory = "/Users/kskrueger/PycharmProjects/DiscordLearning/Personal/package-2/" |
| import datetime | |
| import random | |
| import time | |
| from multiprocessing import Lock | |
| from notion.client import * | |
| from notion.block import * | |
| mutex = Lock() |
| package middleware | |
| import ( | |
| "net/http" | |
| "os" | |
| "path" | |
| "strings" | |
| ) | |
| // FSHandler404 provides the function signature for passing to the FileServerWith404 |
| Setup: Intel Haswell, Debian. Both tests ran against the same image libraries (libjpeg-turbo etc). | |
| Both ran on a single thread only. Save qualities were 85 for JPEG and WEBP, compress level 7 for PNG. | |
| Both tests ran many iterations and then averaged results. | |
| Benchmarking code can be found at https://github.com/discordapp/lilliput-bench | |
| Test types: | |
| - Header reading: We don't actually know what's in a blob of image bytes when we get it. Reading the header allows us | |
| to decide if we want to resize the image. | |
| - Resize, 256x256 => 32x32: We have lots of icon-sized assets that we need resized into various smaller formats. | |
| These make up a pretty sizable percentage of our resizes. |
To copy database from one heroku app to another -
heroku pg:backups capture [database_name]
heroku pg:backups restore $(heroku pg:backups public-url --app source_app) DATABASE_URL --app target_app
You can refer to https://devcenter.heroku.com/articles/heroku-postgres-backups for more information.
To copy database from local to heroku -
Dump your local database in compressed format using the open source pg_dump tool: PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
where myuser is your database username and mydb is the database name.
| // Get a reference to the image element | |
| var elephant = document.getElementById("elephant"); | |
| // Take action when the image has loaded | |
| elephant.addEventListener("load", function () { | |
| var imgCanvas = document.createElement("canvas"), | |
| imgContext = imgCanvas.getContext("2d"); | |
| // Make sure canvas is as big as the picture | |
| imgCanvas.width = elephant.width; |