Skip to content

Instantly share code, notes, and snippets.

View ErunamoJAZZ's full-sized avatar
😮‍💨
Time to heal

C Daniel ErunamoJAZZ

😮‍💨
Time to heal
View GitHub Profile
@jamesmosier
jamesmosier / android-google-play-api-subscriptions.js
Created March 27, 2018 15:53
Example, using Node, on how to get user subscriptions using the Google Play Developer API (with androidpublisher role)
const { google } = require("googleapis");
const publisher = google.androidpublisher("v2");
const OAuth2 = google.auth.OAuth2();
const SERVICE_ACCOUNT_EMAIL = "some_google_acccount@gmail.com";
const SERVICE_ACCOUNT_KEY_FILE = require("./path/to/credentials.json");
const jwtClient = new google.auth.JWT(
SERVICE_ACCOUNT_KEY_FILE.client_email,
@viktorklang
viktorklang / ExecutionContextExecutorServiceBridge.scala
Last active June 27, 2022 11:38
Turning an ExecutionContext to an ExecutorService (or rather and ExecutorService AND an ExecutionContext) using Scala 2.10+
/*
Copyright 2013 Viktor Klang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@arjones
arjones / gist:1239358
Created September 24, 2011 14:01 — forked from stonegao/gist:1044641
MD5 in scala
object MD5 {
def hash(s: String) = {
val m = java.security.MessageDigest.getInstance("MD5")
val b = s.getBytes("UTF-8")
m.update(b, 0, b.length)
new java.math.BigInteger(1, m.digest()).toString(16)
}
}