Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>viddler-test</title>
<script src="http://www.google.com/jsapi"></script>
<script>google.load("swfobject", "2.1");</script>
<script src="http://cdn.static.viddler.com/js/vapi.js" type="text/javascript"></script>
<script src='http://code.jquery.com/jquery-2.0.0.js' type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
@drewww
drewww / create-hangout-event.js
Created May 28, 2013 18:48
NodeJS/express server that demonstrates how to get hangout urls by creating events on an account that has auto-create hangout set. That account is the account of the person completing the oauth process, not the account that creates the CLIENT_ID/CLIENT_SECRET.
var moment = require('moment');
var googleapis = require('googleapis');
var GoogleToken = require('gapitoken');
var OAuth2Client = googleapis.OAuth2Client;
var express = require('express');
var app = express();
var oauth2Client;
@drewww
drewww / MinimalSockJSClient.java
Created October 5, 2012 14:16
SockJS 'close' event debugging
package com.multitudecorp.benchmark.client;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
// This library is available here: https://github.com/TooTallNate/Java-WebSocket
#!/usr/bin/env ruby
#^syntax detection
site 'http://community.opscode.com/api/v1'
cookbook 'apt',
:git=>'https://github.com/opscode-cookbooks/apt'
cookbook 'git',
:git=>'https://github.com/opscode-cookbooks/git'
cookbook 'build-essential',
@drewww
drewww / index.html
Created May 26, 2012 15:55
JSCam Test
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>jscam test</title>
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script type="text/javascript" src="jscam/jquery.webcam.js"></script>
<script type="text/javascript" charset="utf-8">
@drewww
drewww / client.py
Created November 28, 2011 21:48
Connect to socket.io server from python, using websocket
#!/usr/bin/env python
# encoding: utf-8
"""
client.py
Based heavily on:
- https://github.com/mtah/python-websocket/blob/master/examples/echo.py
- http://stackoverflow.com/a/7586302/316044
Created by Drew Harry on 2011-11-28.
#!/usr/bin/env ruby
# This script performs an OAuth authorized POST with multipart encoding to
# http://twitter.com/account/update_profile_image.json
#
# This code is primarily taken from my Grackle library's implementation at
# http://github.com/hayesdavis/grackle
#
# RUNNING THIS WILL CHANGE AN ACCOUNT'S PROFILE IMAGE. BE CAREFUL.
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Combo-handled YUI CSS files: -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.1/build/button/assets/skins/sam/button.css&2.8.1/build/datatable/assets/skins/sam/datatable.css">
<!-- Combo-handled YUI JS files: -->
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.1/build/yahoo-dom-event/yahoo-dom-event.js&2.8.1/build/element/element-min.js&2.8.1/build/button/button-min.js&2.8.1/build/datasource/datasource-min.js&2.8.1/build/datatable/datatable-min.js"></script>
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
application = tornado.web.Application([
(r"/", MainHandler),