- 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| a { | |
| text-decoration:none; | |
| } | |
| a:hover { | |
| text-decoration:none; | |
| } |
This file contains hidden or 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
| <!-- message --> | |
| <cfoutput>#createMessage("Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput> | |
| <br /><br /> | |
| <!-- facebook --> | |
| <a name="fb_share" share_url="http://www.energyincommon.org" type="button">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> | |
| <br /><br /> | |
| <!-- twitter --> | |
| <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.energyincommon.org" data-text="<cfoutput>#createMessage("Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput>" data-count="horizontal" data-via="energyincommon">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
This file contains hidden or 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
| <cffunction name="createMessage"> | |
| <cfargument name="name" required="true" type="string"> | |
| <cfargument name="amount" required="true" type="string"> | |
| <cfargument name="activity" required="true" type="string"> | |
| <cfargument name="technology" required="true" type="string"> | |
| <cfargument name="location" required="true" type="string"> | |
| <cfreturn "Help " & name & " collect " & amount & " for " & technology & " (" & activity & ") in " & location> | |
| </cffunction> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head></head> | |
| <body> | |
| <a href="http://twitter.com/share" class="twitter-share-button" | |
| data-url="http://www.energyincommon.org" | |
| data-text="<cfoutput>#createTwitterMessage("Frist Name Last Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput>" | |
| data-count="horizontal" data-via="energyincommon">Tweet</a> | |
| <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | |
| </body> |
This file contains hidden or 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
| <cfscript> | |
| // creates message ready for Twitter for given paramaters | |
| function createTwitterMessage(name, amount, activity, technology, location) { | |
| return "Help " & name & " collect " & amount & " for " & activity & " in " & location; | |
| } | |
| </cfscript> |