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
requires: yui2-container | |
//declaration | |
var YAHOO = Y.YUI2; | |
var myPopup = function (modalElement) { | |
//create a locally scoped YUI panel | |
var modal = new YAHOO.widget.Panel(modalElement, { | |
fixedcenter: true, | |
visible: 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
var cfg = { | |
method: 'POST', | |
data: '{"clientname": "Test"}', | |
headers: { 'Content-Type': 'application/json' }, | |
on: { success: function (id, o, args) { | |
Y.log('Success'); | |
}, | |
failure: function () { | |
Y.log('Post Error'); | |
} |
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
Initialise repository: git init | |
Remote add: git remote add appharbor https://paulallies@appharbor.com/nanotouch.git | |
Add files to repository: git add . | |
Check in: git commit -m 'Updated' | |
Push to repository: git push appharbor master |
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
//Bad way to declare objects and arrays | |
var person = new Object(), | |
keys = new Array(); | |
//A better way is to use object literals | |
var person = {}, | |
keys = []; | |
//Example | |
var person = { |
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 test = function(){ | |
alert('hello from github'); | |
}; |
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 test = function(){ | |
console.log('hello from github'); | |
}; |
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 https = require('https'); | |
var test = ""; | |
var host = 'api.mongolab.com'; | |
var options = { | |
host: host, | |
port: 443, | |
path: "/", | |
method: 'GET' | |
}; | |
var YUI = require("yui").YUI; |
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
<!doctype html> | |
<head> | |
<head> | |
<title>This is a test</title> | |
</head> | |
<body> | |
<h2>Testing</h2> | |
</body> | |
</head> |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
<!doctype html> | |
<head> | |
<head> | |
<title>This is a test</title> | |
</head> | |
<body> | |
<h2>Testing</h2> | |
</body> | |
</head> |