Skip to content

Instantly share code, notes, and snippets.

View sauvikatinnofied's full-sized avatar

Sauvik Dolui sauvikatinnofied

View GitHub Profile
{
"success": true,
"data": [
{
"_id": "54bfacf4339871fe3bf02be3",
"createdAt": "2015-01-21T13:43:16.526Z",
"updatedAt": "2015-01-21T13:43:16.526Z",
"name": "Innofied Hackathon",
"registrationLink": "http://www.innofied.com",
"website": "www.innofied.com",
@sauvikatinnofied
sauvikatinnofied / gist:a9dc5e64ecf8fba7ffe4
Last active August 29, 2015 14:17
EAEventSearchNextLoad
{
"success": true,
"data": {
"skip": 0,
"limit": 10,
"total": 20,
"events": [
{
"_id": "54d9f32e5dc9ae0c1507e669",
"name": "Tie Darjeeling",
@sauvikatinnofied
sauvikatinnofied / NexmoOutPut
Created September 11, 2015 11:57
NexmoOutPut
2015-09-11 17:22:40.437 Test[1657:104268] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7f846145a6c0 H:[UITextField:0x7f846145a3f0(439)]>",
"<NSLayoutConstraint:0x7f846145d630 UITextField:0x7f846145a3f0.leading == UIView:0x7f846145be40.leadingMargin + 22>",
"<NSLayoutConstraint:0x7f846145d6d0 UIView:0x7f846145be40.trailingMargin == UITextField:0x7f846145a3f0.trailing + 107>",
"<NSLayoutConstraint:0x7f846146abb0 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7f846145be40(320)]>"
)
Will attempt to recover by breaking constraint
// Put your ideas here...
[{
"_id": "54bfacf4339871fe3bf02be3",
"createdAt": "2015-01-21T13:43:16.526Z",
"updatedAt": "2015-01-21T13:43:16.526Z",
"name": "Innofied Hackathon",
"registrationLink": "http://www.innofied.com",
"website": "www.innofied.com",
"socialLinks": [],
"brandLogo": {
"key": "",
{
"id": "4j234567eewijf34343j",
"username": "Debanjan",
"totalSteps": 10,
"totalDistance": 10,
"totalCaloriesBurned": 10,
"totalActiveTime": 10,
"activityDate": "2016-07-08T12:48:36.807Z",
"goalMet": "None"
}
@sauvikatinnofied
sauvikatinnofied / NetworkStatusListener.swift
Last active January 19, 2017 15:08
Medium Blog Post Code Snippet
/// Protocol for listenig network status change
public protocol NetworkStatusListener : class {
func networkStatusDidChange(status: Reachability.NetworkStatus)
}
@sauvikatinnofied
sauvikatinnofied / ListenersArray.swift
Last active January 19, 2017 15:07
Medium Blog Post Code Snippet
// 6. Array of delegates which are interested to listen to network status change
var listeners = [NetworkStatusListener]()
@sauvikatinnofied
sauvikatinnofied / HelperMethods.swift
Last active January 19, 2017 15:06
Medium Blog Post Code Snippet
/// Adds a new listener to the listeners array
///
/// - parameter delegate: a new listener
func addListener(listener: NetworkStatusListener){
listeners.append(listener)
}
/// Removes a listener from listeners array
///
/// - parameter delegate: the listener which is to be removed
@sauvikatinnofied
sauvikatinnofied / AdditionInReachabilityChangedFunc.swift
Last active January 19, 2017 15:04
Medium Blog Post Code Snippet
// Sending message to each of the listeners
for listener in listeners {
listener.networkStatusDidChange(status: reachability.currentReachabilityStatus)
}