Skip to content

Instantly share code, notes, and snippets.

const zip = (arr, ...arrs) => {
return arr.map((val, i) => arrs.reduce((a, arr) => [...a, arr[i]], [val]))
}
const cidrToRegex = cidr => {
const [ip, prefix] = cidr.split('/')
const base = ip
.split('.')
.map(val => parseInt(val))
@radu-c
radu-c / AppengineHttpRequestor.java
Last active January 12, 2016 23:05
Google Appengine friendly Dropbox SDK HttpRequestor. Replaced all HttpsURLConnection in com.dropbox.core.http.StandardHttpRequestor with HttpURLConnection.
package com.code11.dropbox.appengine;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.Proxy;
import java.net.URL;
import com.dropbox.core.http.HttpRequestor;