Skip to content

Instantly share code, notes, and snippets.

View unoseistres's full-sized avatar

uno seis tres unoseistres

View GitHub Profile
@unoseistres
unoseistres / gist:fc858f0921362c9081bd
Created April 13, 2015 03:47
.off not functioning
var foo= $(document).on("pagecreate","#section2",function(){
$("#section2").on("swiperight",function(){
$.mobile.changePage("#section1",{transition:"slide", reverse:true
});
var handler = function(event) {
if(document.getElementById('drop').style.display=="block") {
$("#section2").off( "swiperight");
console.log("remove");
}
$(document).on("pagecreate","#section2",function(){
$("#section2").on("swiperight",function(){
$.mobile.changePage("#section1",{transition:"slide", reverse:true
});
var handler = function(event) {
if(document.getElementById(drop).style.display==="block") {
removeEventListener("swiperight", handler, false);
console.log("remove");
}
@unoseistres
unoseistres / gist:b0ebedd1a1180b938244
Created March 30, 2015 16:49
resizing with native javascript
////////////////save picture
function save(dataURL){
alert("do you want to save?");
@unoseistres
unoseistres / server.js
Created November 12, 2014 05:04
server.js
/*
//////////////////////////////// HTTP Portion
// HTTP Portion
var http = require('http');
var fs = require('fs'); // Using the filesystem module
var httpServer = http.createServer(requestHandler);
var url = require('url');
httpServer.listen(8088);
function requestHandler(req, res) {
@unoseistres
unoseistres / mobile.html
Created November 12, 2014 05:03
mobile.html
<html>
<head>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript">
var socket = io.connect('http://104.131.93.171');
socket.on('connect', function() {
console.log("Connected biatch");
@unoseistres
unoseistres / index.html
Created November 12, 2014 05:03
index.html
<html>
<head>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript">
var sharonIndex=0;
var myid;
var socket = io.connect('http://104.131.93.171');
//////////////////////////////// HTTP Portion
var http = require('http');
var fs = require('fs'); // Using the filesystem module
var path = require('path');
var httpServer = http.createServer(requestHandler);
httpServer.listen(8088);
/*
function requestHandler(req, res) {
// Read index.html
<html>
<head>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript">
var socket = io.connect('http://104.131.93.171');
socket.on('connect', function() {
console.log("Connected biatch");
/* console.log("mobile"); */
<html>
<head>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript">
var socket = io.connect('http://104.131.93.171');
socket.on('connect', function() {
console.log("Connected");
});
// Daniel Shiffman
// Programming from A to Z, Fall 2014
// https://github.com/shiffman/Programming-from-A-to-Z-F14
// This examples builds a very simple DOM visualization of concordance
// It reads the text one word a a time and animates the words growing according to their counts
var concordance;
var wutang;
var canvas;