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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8"> | |
window.onload = function(){ | |
var display = document.getElementById('display'), | |
count; | |
for(count=0; count < 100000; count++) { | |
// 1kb | |
sessionStorage.setItem('i'+count, '01234567890123456789012345678901234567890123456789'+ |
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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8"> | |
function transactionErrorCallback(error) { | |
console.error('Oops. Transaction error was '+error.message+' (Code '+error.code+')'); | |
} | |
function transactionSuccessCallback() { | |
alert('Done'); | |
} |
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
MiniApp.Tappable = { | |
_tap_tapCount: null, | |
_tap_candidateTouch: null, | |
_tap_eventTimer: null, | |
tapWiggle: 10, | |
tapDelay: 200, | |
tapStart: function(evt){ |
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
use Rack::ShowExceptions | |
use Rack::CommonLogger | |
require 'rack/request' | |
require 'rack/response' | |
require 'open-uri' | |
class HeaderProxy | |
def call(env) | |
req = Rack::Request.new(env) |
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 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Morphing Power Cubes</title> | |
<style type="text/css" media="screen"> | |
body { | |
background-color: black; |
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
####################### | |
#### DOCUMENTATION #### | |
####################### | |
# | |
# Run as: | |
# | |
# ruby phonegap-sc.rb APP_NAME | |
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH | |
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH OUTPUT_PATH | |
# |
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
SC.routes.currentLocationDidChange = function(){ | |
this.set('location', this.get('currentLocation')); | |
}; | |
SC.routes.addObserver('currentLocation', SC.routes, 'currentLocationDidChange'); | |
SC.routes.locationDidChange = function(){ | |
var location = this.get('location'), | |
current = this.get('currentLocation'); | |
if (location !== current) { | |
this.trigger(); |
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
#!/usr/local/bin/ruby | |
require "socket" | |
irc = TCPSocket.open('irc.freenode.net', 6667) | |
irc.send("USER blah blah blah :blah blah\n", 0) | |
irc.send("NICK ChanScanBot\n", 0) | |
irc.send("JOIN #sproutcore\n", 0) | |
names = [] |
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'optparse' | |
class File | |
def self.binary?(name) | |
fstat = stat(name) | |
return false unless fstat.file? |
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
C:/Ruby192/bin/ruby.exe extconf.rb | |
Compiling The Ruby Racer... | |
checking for v8.h in C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.4.4-x86-mingw32/lib/libv8/v8/include... yes | |
checking for main() in -lpthread... no | |
creating Makefile | |
make | |
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_v8'" > v8-i386-mingw32.def | |
g++ -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -IC:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.4.4-x86-mingw32/lib/libv8/v8/include -Wall -g -rdynamic -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o rr.o -c rr.cpp | |
rr.cpp: In function 'VALUE rr_define_finalizer(VALUE, void*, VALUE)': |