Skip to content

Instantly share code, notes, and snippets.

Michael Ensly mensly

Block or report user

Report or block mensly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mensly / AzureRestApiService.kt
Last active Feb 8, 2017
Code snippet for setting up an Azure Notification Hub installation (*not* registration) in Kotlin using Retrofit
View AzureRestApiService.kt
interface RestApiService {
companion object {
const val PUSH_PLATFORM = "gcm"
fun installPush(@Url endpoint: String,
@Header("Authorization") authorization: String,
@Body request: PushInstallationRequest): Observable<ResponseBody>
mensly / gist:6291843
Last active Dec 21, 2015
php-style argument parse thing
View gist:6291843
import re
def phpdict(src):
myDict = {}
for k, v in src.items():
pattern ='([^[]+)((?:\[[^\]]*\])+)', k)
if pattern:
path = [(int(p) if p.isdigit() else p) for p in re.findall('\[([^\]]+)\]', k)]
new_key =
You can’t perform that action at this time.