- Bytes and Blobs by David Flanagan
- Conference Wifi Redux by Malte Ubi
- Sashimi - https://github.com/cramforce/Sashimi
- Run Your JS everywhere with Jellyfish by Adam Christian - http://jelly.io Project
- Fighting Crime and Kicking Apps with Batman.js by Nick Small
- Hello Jo by Dave Balmer - Project - http://joapp.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chain() { | |
var cur = prev = null; | |
for (var i = l = arguments.length - 1; i >= 0; i--) { | |
prev = cur; | |
cur = (function(params) { | |
return function() { | |
for (var param in params) { | |
this[param] = params[param]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo() {}; | |
Foo.prototype = {}; | |
var foo = new Foo(); | |
foo.__proto__ == Foo.prototype; // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Foo1 = function() {}; | |
var Foo2 = function() {}; | |
var foo1 = new Foo1(); | |
console.log(foo1.constructor == Foo1.prototype.constructor) // true | |
console.log(Foo1.prototype.constructor == Foo1) // true | |
console.log(foo1.constructor == Foo1) // true | |
console.log(foo1.constructor == foo1.__proto__.constructor) // true | |
console.log(foo1.__proto__.constructor == Foo1) // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// primitives are passed by value | |
var a = 4; | |
function fn1(val) { | |
val = 5; | |
} | |
fn1(a); | |
alert(a) // still 4 | |
// objects are passed by reference | |
var o = {a: 4}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editor = new TINY.editor.edit('editor', { | |
id: "editor", | |
width: 400, | |
height:200, | |
cssclass:'te', | |
controlclass:'tecontrol', | |
rowclass:'teheader', | |
dividerclass:'tedivider', | |
controls:['bold','italic','link','unlink','image','orderedlist','unorderedlist','undo','redo'], | |
footer:false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(fn, wait) { | |
var timeout = null; | |
return function () { | |
clearTimeout(timeout); | |
var args = arguments; | |
var ctx = this; | |
timeout = setTimeout(function () { | |
fn.apply(ctx, args); | |
}, wait); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1. variable declaration: | |
// declaration | |
function foo() { | |
return true; | |
var x = 1; | |
} | |
// interpretation | |
funciton foo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eqToAny (el /*, args */) { | |
var args = [].slice.call(arguments, 1); | |
if (args.length == 0) return false; | |
for (var i = 0, l = args.length; i < l; i++) { | |
if (el === args[i]) { | |
return true; | |
} | |
} | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jruby 1.6.2 (ruby-1.9.2-p136) (2011-05-23 e2ea975) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java] | |
Michal:rice-on-rails mkuklis$ bundle exec warble config --trace | |
warble aborted! | |
stack level too deep | |
org/jruby/RubyArray.java:1602:in `each' | |
/Users/mkuklis/.rvm/gems/jruby-1.6.2@rice-on-rails/gems/railties-3.0.8/lib/rails/plugin.rb:51:in `load_deprecated_tasks' | |
/Users/mkuklis/.rvm/gems/jruby-1.6.2@rice-on-rails/gems/railties-3.0.8/lib/rails/plugin.rb:44:in `load_tasks' | |
/Users/mkuklis/.rvm/gems/jruby-1.6.2@rice-on-rails/gems/railties-3.0.8/lib/rails/application.rb:140:in `load_tasks' | |
org/jruby/RubyArray.java:1602:in `each' |