Skip to content

Instantly share code, notes, and snippets.

View rondomondo's full-sized avatar

David Kierans rondomondo

  • Singapore
View GitHub Profile
@paulirish
paulirish / log-the-datatransfer-data.js
Created February 15, 2018 01:55
log paste and copy event payloads
document.body.innerHTML = 'Paste or drop items onto this page. View results in console.';
function getPayload(item) {
const kind = item.kind;
switch (kind) {
case 'string': return new Promise(res => item.getAsString(res));
case 'file': return Promise.resolve(item.getAsFile());
default: throw new Error('unknown item kind! ' + kind);
}
@jehna
jehna / import_backup.py
Last active September 11, 2021 04:36
App Engine import data from Datastore Backup to localhost
"""
# App Engine import data from Datastore Backup to localhost
You can use this script to import large(ish) App Engine Datastore backups to your localohst dev server.
## Getting backup files
Follow instructions from Greg Bayer's awesome article to fetch the App Engine backups:
http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/