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
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 ); |
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
=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') |
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
{ 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'; }, |
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
# 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" |
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
/* traditional way */ | |
(function($) { | |
$(document).ready(function() { | |
$('#searchForm').submit(function(e) { | |
var term = $.trim($(this).find('input[name="q"]').val()); | |
if (!term) { return; } | |
$.getJSON( |
all libraries are open source, unless otherwise mentioned
XUI - DOM manipulation, Ajax, Events, CSS, FX
http://github.com/xui/xui
Lawnchair - offline storage wrapper
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
<?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/> |
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 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") | |
}); |
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
/* | |
Read more here: | |
https://developer.mozilla.org/en/CSS/@-moz-document | |
For more browser-specific hacks: | |
http://paulirish.com/2009/browser-specific-css-hacks | |
*/ | |
@-moz-document url-prefix() { | |
/* Put your Firefox specific code here. */ |
OlderNewer