Skip to content

Instantly share code, notes, and snippets.

@pkmishra
pkmishra / introrx.md
Created January 9, 2018 06:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@pkmishra
pkmishra / walls.py
Created October 30, 2013 09:21 — forked from igor47/walls.py
#!/usr/bin/python
def water(levels, second_pass = False):
# sanity check
if len(levels) < 2:
return 0
# state machine
filling = False
h = 0
package com.mojolly.backchat
package redis
package resque
import com.mojolly.backchat.redis.resque.Resque.{ResqueWorkerActor}
import net.liftweb.json._
import JsonAST._
import JsonDSL._
import java.net.InetAddress
import com.redis.ds.{ RedisDeque, RedisDequeClient }
@pkmishra
pkmishra / jQuery.ajaxQueue.min.js
Created May 12, 2012 02:04 — forked from gnarf/jQuery.ajaxQueue.min.js
jQuery.ajaxQueue - A queue for ajax requests
/*
* jQuery.ajaxQueue - A queue for ajax requests
*
* (c) 2011 Corey Frang
* Dual licensed under the MIT and GPL licenses.
*
* Requires jQuery 1.5+
*/
(function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).then(b,b).done(e.resolve).fail(e.reject)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery)