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
#! /usr/bin/env python | |
import sys | |
import os | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
from PySide.QtWebKit import * | |
app = QApplication(sys.argv) | |
app.setQuitOnLastWindowClosed(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
Running V8 API tests... | |
TEST-INFO | (test_api.cpp) | Not running test_Handles (DISABLED). | |
TEST-INFO | (test_api.cpp) | Running test_Access. | |
TEST-INFO | (test_api.cpp) | Not running test_Script (DISABLED). | |
TEST-INFO | (test_api.cpp) | Running test_TinyInteger. | |
TEST-INFO | (test_api.cpp) | Running test_TinyUnsignedInteger. | |
TEST-INFO | (test_api.cpp) | Running test_OutOfSignedRangeUnsignedInteger. | |
TEST-INFO | (test_api.cpp) | Not running test_Number (DISABLED). | |
TEST-INFO | (test_api.cpp) | Not running test_ToNumber (DISABLED). | |
TEST-INFO | (test_api.cpp) | Not running test_Boolean (DISABLED). |
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
/* | |
______________________________________ | |
/ _____/\__ ___/\_ _____/\_____ \ | |
/ \ ___ | | | __) / | \ | |
\ \_\ \ | | | \ / | \ | |
\______ / |____| \___ / \_______ / | |
\/ \/ \/ | |
*/ |
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
emulate: | |
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd default > /dev/null 2>&1 & # put the avd's chatty ass in the background | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
palm-emulator --start "SDK 1.4.5.465 (320x480)" |
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
// simple animation | |
x$('#box').tween({ left:'100px'}); | |
// more complicated... | |
x$('#box').tween({ left:'100px', duration:'0.1' }); | |
// queue transitions w/ an array.. | |
x$('#box').tween([{left:'100px'}, { right:'100px' }]); |
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
// monitor wifi signal strength | |
navigator.system.get("Network", function(connection) { | |
// helper that updates the dom | |
function updateStatus(conn) { | |
var msg = "Wireless "+conn.essid+" at "+(conn.signalStrength*100)+"%"; | |
x$('#network-status').html(msg); | |
} | |
// only watch the wifi setting |
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> | |
<title>isReachable Example</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
document.addEventListener("deviceready", function() { | |
function reachableCallback(reachability) { | |
var state = reachability.code || reachability |
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
// create a new store | |
var store = new Lawnchair({adaptor:'dom', table:'people'}); | |
// saving documents | |
store.save({name:'brian'}); | |
// optionally pass a key | |
store.save({key:'config', settings:{color:'blue'}}); | |
// updating a document in place is the same syntax |
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> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>wtfwebkit</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
document.addEventListener("deviceready", function() { | |
var foo = "<p>hello world</p>" | |
, master = document.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
// curl -k https://localhost:8000/ | |
var https = require('https'); | |
var fs = require('fs'); | |
var options = { | |
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
}; | |
var server = https.createServer(options, function (req, res) { |