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 url = "https://"+un+":"+pw+"@twitter.com/statuses/update.json"; | |
var xhr = Titanium.Network.createHTTPClient(); | |
xhr.onload = function() { | |
// Handle response | |
}; | |
xhr.open("POST",url); | |
xhr.send({ status:'My awesome tweet!' }); |
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
Y.use('dd-drag', function(Y) { | |
var dd = new Y.DD.Drag({ | |
node: '#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
<script type="text/javascript" | |
src="http://yui.yahooapis.com/3.2.0/build/simpleyui/simpleyui-min.js"></script> | |
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
/** | |
* Sanitize URL — Validate it looks like a URL, then make it less dirty. | |
* | |
* Oddnut Software | |
* Copyright (c) 2010 Eric Ferraiuolo - http://eric.ferraiuolo.name | |
* MIT License - http://www.opensource.org/licenses/mit-license.php | |
* | |
* Examples: | |
* | |
* 'Http://WWW.example.com/' » 'http://www.example.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
#!/bin/bash | |
SERVER=https://api.no.de | |
SCRIPT="$0" | |
if [ ${SCRIPT:0:1} == "/" ]; then | |
SCRIPT="$(basename -- "$SCRIPT")" | |
fi | |
main () { | |
cmd=${1-help} |
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
/*** CAREERS ***/ | |
var resumeSubmitBtn = Y.one('#job-submit-resume'), | |
friendSubmitBtn = Y.one('#job-send-to-a-friend'); | |
resumeSubmitBtn.on('click', function(e){ | |
// get xhr response text | |
Y.io('/xhr/submit-resume.php?title=' + Y.one('#job_title').get('value') + '&job_subject=' + Y.one('#job_subject').get('value'), { | |
on : { | |
success : function(id, o, args) { |
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> | |
<html> | |
<head> | |
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script> | |
<style> .red { color: red; } </style> | |
</head> | |
<body> | |
<div id="myDiv">Happy</div> | |
<script> |
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
/* | |
* An example of | |
* 1. Using the YUI 3 module system to encapsulate a custom class for reuse | |
* 2. Creating a Plugin class | |
* 3. Using Y.Base.create to generate the class | |
*/ | |
// YUI.add( | |
// "dash-separated-module-name", | |
// function (Y) { Y.MyModule = ...; }, |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
</head> | |
<body> | |
<span id="login"></span> | |
<script type="text/javascript" src="http://yui.yahooapis.com/3.2.0pr2/build/yui/yui-min.js"></script> |
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
//<iframe id="frame"> | |
var frame = Y.Node.getDOMNode(Y.one('#frame')); | |
YUI({ | |
win: frame.contentWindow, | |
doc: frame.contentWindow.document | |
}).use('node', function(Frame) { | |
//An element inside the frame | |
var foo = Frame.one('#foo'); | |
}); |
OlderNewer