Skip to content

Instantly share code, notes, and snippets.

View joewashear007's full-sized avatar

Joseph Livecchi joewashear007

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#bg").animate({height: "400px",}, 1500, "swing", function(){
$('video').get(0).play()
} );
@joewashear007
joewashear007 / temp-server.py
Created January 6, 2014 01:06
A Simple Web Socket Demo that displays current temperature from a Raspberry pi's GPIO pins using a temperature sensor. Needs: Rashberry Pi, temperature probe, python 2.7, Tornado Webserver 1) Read This: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/ 2) Install tornado Webserver 3) Change the ws address in html file to the lo…
import time
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
from tornado.ioloop import PeriodicCallback
import tornado.web
class WSHandler(tornado.websocket.WebSocketHandler):
def open(self):
self.callback = PeriodicCallback(self.send_temp, 120)