Skip to content

Instantly share code, notes, and snippets.

View kirang89's full-sized avatar

Kiran Gangadharan kirang89

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
@vindolin
vindolin / colortimeit.py
Last active August 29, 2015 14:06
Simple module for rought timing of python code
from __future__ import print_function
import time
print_func = print
def format_sec(milliseconds):
return '{:>8.3f} sec.'.format(milliseconds / 1000.0)
current_milli_time = lambda: int(round(time.time() * 1000))
@jspahrsummers
jspahrsummers / GHRunLoopWatchdog.h
Created January 28, 2015 20:50
A class for logging excessive blocking on the main thread
/// Observes a run loop to detect any stalling or blocking that occurs.
///
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for