Skip to content

Instantly share code, notes, and snippets.

@raffi-minassian
raffi-minassian / index.js
Created September 27, 2016 03:15
Quick and dirty auth0 user export to csv using node.js.
/*
Create a dir, install 3 dependent packages, copy this index.js file to dir, run with node ./index.js > users.csv
*/
var async = require('async')
var req = require('request')
var stringify = require('csv-stringify')
var fs = require('fs')
var url = "https://your-subdomain.auth0.com/api/v2/users" //your management api endpoint
@raffi-minassian
raffi-minassian / s3copy-across-aws-accounts.js
Last active December 23, 2020 02:57
Quick and dirty script to copy files in AWS S3 to an S3 bucket in another AWS account with Node.js.
/*
* This is a quick and dirty script for copying files in AWS S3 to other buckets.
* This is written so it can work across AWS accounts.
* You can hack in code to apply work or logic to each file.
*
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible
* and deletes the file immediately when the upload is done.
*
* Best way to use: Spin up a micro in EC2, install node.js,
* create a directory and install the dependencies with