Skip to content

Instantly share code, notes, and snippets.

View nestserau's full-sized avatar

Cheetah694 nestserau

  • Nederland, Randstad
  • 04:48 (UTC +01:00)
View GitHub Profile
@miguelmota
miguelmota / auth.json
Created February 21, 2019 03:08
AWS Cognito Identity authenticate using cURL
{
"AuthParameters" : {
"USERNAME" : "[email protected]",
"PASSWORD" : "mysecret"
},
"AuthFlow" : "USER_PASSWORD_AUTH",
"ClientId" : "9..............."
}
@benasher44
benasher44 / ios.gradle
Last active April 30, 2019 04:23
iOS Gradle Utilities for Generating Fat Frameworks and dSYMs
afterEvaluate {
// Create tasks for creating fat frameworks and fat dsyms for sim and device
def binaryKinds = [
// config, sim task, device task
new Tuple('Debug', linkDebugFrameworkIosSim, linkDebugFrameworkIosDevice),
new Tuple('Release', linkReleaseFrameworkIosSim, linkReleaseFrameworkIosDevice),
]
@Sloy
Sloy / AutoSummaryListPreference
Created June 29, 2013 13:16
Android custom ListPreference which shows its selected value as summary, as suggested in the official guidelines. No need to use OnPreferenceChangeListener in the Activity or anything like that. Only assign entries and entryValues.
package com.your.package;
import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;
/**
* Created by Rafa Vázquez on 29/06/13.
*
* ListPreference item that shows its selected value as summary.
@exalted
exalted / gist:726910
Created December 3, 2010 12:42
This will convert DateTime (.NET) object serialized as JSON by WCF to a NSDate object
/*
* This will convert DateTime (.NET) object serialized as JSON by WCF to a NSDate object.
*/
// Input string is something like: "/Date(1292851800000+0100)/" where
// 1292851800000 is milliseconds since 1970 and +0100 is the timezone
NSString *inputString = [item objectForKey:@"DateTimeSession"];
// This will tell number of seconds to add according to your default timezone
// Note: if you don't care about timezone changes, just delete/comment it out