I hereby claim:
- I am phajduk on github.
- I am phajduk (https://keybase.io/phajduk) on keybase.
- I have a public key whose fingerprint is 98FF C974 7825 E640 9EA9 2AA1 7571 470A C2F4 89CC
To claim this, I am signing this object:
#!/bin/bash | |
export DATABRICKS_TOKEN=<token> | |
export DATABRICKS_INSTANCE=<instance> | |
curl -X GET --header "Authorization: Bearer $DATABRICKS_TOKEN" \ | |
https://$DATABRICKS_INSTANCE.cloud.databricks.com/api/2.0/preview/scim/v2/Me | |
# or | |
#https://$DATABRICKS_INSTANCE.cloud.databricks.com/api/2.0/clusters/list |
I hereby claim:
To claim this, I am signing this object:
public class UrlHelper { | |
public static Map<String, String> splitQuery(String query) { | |
Map<String, String> queryPairs = new LinkedHashMap<>(); | |
String[] pairs = query.split("&"); | |
for(String pair : pairs) { | |
int idx = pair.indexOf("="); | |
try { | |
queryPairs.put(URLDecoder.decode(pair.substring(0, idx), "UTF-8"), URLDecoder.decode(pair.substring(idx + 1), "UTF-8")); | |
} catch(UnsupportedEncodingException e) { | |
Timber.e(e, "Problem during parsing query args"); |
Uri path = Uri.fromFile(file); | |
MimeTypeMap typeMap = MimeTypeMap.getSingleton(); | |
String extension = MimeTypeMap.getFileExtensionFromUrl(path.toString()).toLowerCase(); | |
if (extension.contains(".")) { | |
extension = extension.substring(extension.lastIndexOf(".")); | |
} | |
String mimeType= typeMap.getMimeTypeFromExtension(extension); |