Skip to content

Instantly share code, notes, and snippets.

Avinash Ananth Narayan R Avinash-Bhat

Block or report user

Report or block Avinash-Bhat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Avinash-Bhat
Avinash-Bhat / qr-pure-js.js
Created Dec 6, 2012
showing url as a QR code
View qr-pure-js.js
(function() {
function cssAsNum(width){
return Number(width.replace("px",""))
}
var body,img;
body = document.body;
img = document.createElement("img");
img.style.userSelect = "none";
img.style.position = "fixed";
img.style.zIndex = 999999;
@Avinash-Bhat
Avinash-Bhat / jquery.ui.widget-(partial).js
Created Nov 5, 2012
fix for problematic bug in jquery ui 1.9.1 (ticket#8775)
View jquery.ui.widget-(partial).js
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
@Avinash-Bhat
Avinash-Bhat / Benchmark.coffee
Created Aug 22, 2012
Simple Benchmark class for minor performance testing.
View Benchmark.coffee
_avg = (items) ->
sum = 0
sum += item for item in items
sum / items.length
class Benchmark
constructor: (@functions,@maxSampling) ->
@check()
check: () ->
You can’t perform that action at this time.