Skip to content

Instantly share code, notes, and snippets.

View venkatd's full-sized avatar

Venkat Dinavahi venkatd

View GitHub Profile
(function(root){
// Let's borrow a couple of things from Underscore that we'll need
var deferred_object_id = 0x1b443e69;
// _.each
var breaker = {},
AP = Array.prototype,
OP = Object.prototype,
- (void) popToInitialViewController
{
UIViewController *vc;
if (self.navigationController != nil) {
vc = self.navigationController;
[self.navigationController popToRootViewControllerAnimated:NO];
[vc popToInitialViewController];
}
else if (self.tabBarController != nil) {
- (void) popToInitialViewController
{
UIViewController *vc;
if (self.navigationController != nil) {
vc = self.navigationController;
[self.navigationController popToRootViewControllerAnimated:NO];
[vc popToInitialViewController];
}
else if (self.tabBarController != nil) {
vc = self.tabBarController;
- (void) popToInitialViewController
{
UIViewController *vc;
if (self.navigationController != nil) {
vc = self.navigationController;
[self.navigationController popToRootViewControllerAnimated:NO];
[vc popToInitialViewController];
}
else if (self.tabBarController != nil) {
vc = self.tabBarController;
#import <Foundation/Foundation.h>
@interface Event : NSObject
+ (Event *) event;
- (void) subscribe:(id)object action:(SEL)action;
- (void) subscribeOnce:(id)object action:(SEL)action;
- (void) unsubscribe:(id)object;
<?php
/**
* @defgroup domain_strict Domain Strict: strict access control
* Forces users to be assigned to a domain in order to view content on that domain.
*/
/**
* @file
* Forces users to be assigned to a domain in order to view content on that domain.
top
window
location
external
chrome
v8Intl
document
$
jQuery
CTIsPlayback
@venkatd
venkatd / stock_quotes.html
Created November 23, 2012 01:57
Easy way to fetch stock quotes from Yahoo Finance using YQL
AAPL: $<span class="stock-quote" data-value="AAPL"></span>
<br/>
MSFT: $<span class="stock-quote" data-value="MSFT"></span>
<br/>
GE: $<span class="stock-quote" data-value="GE"></span>
class Event
attr_reader :name
def initialize(name)
@name = name
@handlers = []
end
def subscribe(handler = nil, &block)
class Module
class BlockFactory
def initialize(&block)
@proc = Proc.new(&block)
end
def new(*args)
@proc.call(*args)