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> | |
<meta charset="UTF-8"> | |
<title>Three.js チュートリアル1</title> | |
<script src="/javascripts/Three.js"></script> | |
<style> | |
body { | |
background: #333; |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, fs = require('fs') | |
, spdy = require('node-spdy') | |
var options = { |
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
/** | |
* manifest.json(server) | |
*/ | |
{ | |
"manifest_version": 2, | |
"name": "tcp socket server sample", | |
"description": "try tcp socket server coding!!", | |
"version": "0.1", | |
"minimum_chrome_version": "24", |
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 xhr = new XMLHttpRequest(); | |
xhr.open("get", "http://m.youtube.com/watch?ajax=1&layout=mobile&tsp=1&utcoffset=540&v=Dbydyibcfi8&preq="); | |
// xhr.setRequestHeader("User-Agent", "Mozilla/5.0(iPad; U; CPU OS 4_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F191 Safari/6533.18.5") | |
xhr.onload = function(e) { | |
console.log(JSON.parse(e.target.responseText.slice(4)).content.video.fmt_stream_map[1].url); | |
// window.open(JSON.parse(e.target.responseText.slice(4)).content.video.fmt_stream_map[1].url); | |
} | |
xhr.send(); | |
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
/** | |
* A remote controller code for Google presentation. | |
* | |
* At the preview mode, when you execute below code as a bookmarklet, you can move | |
* slides next and previous by your handy smartphone. | |
* This code works with WebSocket application published in https://github.com/KensakuKOMATSU/ws-remocon. | |
* So, url for websocket server should be changed, depends on your environment. | |
*/ | |
(function(){ | |
var ws = new WebSocket('ws://localhost:3000'); |
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 type="text/javascript" src="./lib/jquery-1.9.1.min.js"></script> | |
<script type="text/javascript" src="./lib/peer.js"></script> | |
</head> | |
<body> | |
<form id="connect"> | |
<strong>connect to broker</strong><br> |
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> | |
<meta charset="utf-8"> | |
<script src="./lib/jquery-1.9.1.min.js"></script> | |
</head> | |
<body> | |
<div class="input"></div> | |
<div class="output"></div> | |
</body> |
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> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script src="peer.js"></script> | |
<video id="local"></video> | |
<video id="remote"></video> | |
<button id="start0">start as 0(caller)</button> |
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
$("<canvas>").appendTo("body"); | |
var canvas = $("canvas")[0] | |
, ctx = canvas.getContext('2d') | |
canvas.width = 640, canvas.height = 480; | |
for(var i = 0, l = ent.length; i < l; i++) { | |
var imgURL = ent[i]; | |
var img = new Image(); |
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
app.configure(function(){ | |
app.set('port', process.env.PORT || 3000); | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'ejs'); | |
app.use(express.favicon()); | |
app.use(express.logger('dev')); | |
app.use(express.bodyParser({uploadDir:'./uploads'})); | |
app.use(express.methodOverride()); | |
app.use(allowCrossDomain); | |
app.use(app.router); |
OlderNewer