all libraries are open source, unless otherwise mentioned
XUI - DOM manipulation, Ajax, Events, CSS, FX
http://github.com/xui/xui
Lawnchair - offline storage wrapper
var Parser = require('./jsonparse'); | |
var Http = require('http'); | |
var p = new Parser(); | |
// IMPORTANT, put your username and password in here | |
var username = "yourTwitterUsername", password = "yourPassword"; | |
var client = Http.createClient(80, "stream.twitter.com"); | |
var request = client.request("GET", "/1/statuses/sample.json", { | |
"Host": "stream.twitter.com", | |
"Authorization": (new Buffer(username + ":" + password)).toString("base64") | |
}); |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>manServer</string> | |
<key>OnDemand</key> | |
<false/> |
all libraries are open source, unless otherwise mentioned
XUI - DOM manipulation, Ajax, Events, CSS, FX
http://github.com/xui/xui
Lawnchair - offline storage wrapper
/* traditional way */ | |
(function($) { | |
$(document).ready(function() { | |
$('#searchForm').submit(function(e) { | |
var term = $.trim($(this).find('input[name="q"]').val()); | |
if (!term) { return; } | |
$.getJSON( |
# IMPORTANT! Use Ruby 1.9.1 | |
# command that works for creating a new phonegap-android project | |
ruby bin/droidgap classic "C:/android-sdk/android-sdk-windows" TestGap TestGap.com "C:/www" "C:/phonegap/projects/TestGap" | |
# Open Eclipse and File -> New -> Project. Then choose Android -> Android Project. Give your project a name, click the radio button for "Create project from existing source", and browse to your generated project folder. | |
# Don't forget to add the phonegap.jar to your project. Expand the libs folder and then right-click on phonegap.jar and choose "BuildPath -> Add to Build Path" |
{ name = 'source.css.embedded.html.syntaxhighlighter'; | |
begin = '(?:^\s+)?(<)((?i:pre))\b(?=[^>]*class=([''"])[^>]*?\bbrush\s*:\s*css\b[^>]*?\3)(?![^>]*/>)'; | |
end = '(?<=</(pre|PRE))(>)(?:\s*\n)?'; | |
beginCaptures = { | |
1 = { name = 'punctuation.definition.tag.html'; }; | |
2 = { name = 'entity.name.tag.style.html'; }; | |
}; | |
endCaptures = { 2 = { name = 'punctuation.definition.tag.html'; }; }; | |
patterns = ( | |
{ include = '#tag-stuff'; }, |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
test( 'async tests', function() { | |
// My custom async function | |
function ajax(data, successCallback) { | |
$.ajax({ | |
url: 'server.php', | |
data: data, | |
success: successCallback, | |
error: function( xhr, textStatus ){ | |
ok( false, textStatus ); |