Skip to content

Instantly share code, notes, and snippets.

View donflopez's full-sized avatar
🏠
Working from home

Francisco López donflopez

🏠
Working from home
View GitHub Profile
@donflopez
donflopez / app.js
Created August 31, 2012 16:39
Example socket.io and express.js
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http');
var app = express();
@donflopez
donflopez / app.js
Created August 31, 2012 17:53
Socket.io for app.js
io.sockets.on('connection', function(socket){
socket.emit('connected'); //Evento creado por nosotros se puede llamar 'pepito'
});
@donflopez
donflopez / index.jade
Created September 2, 2012 16:57
Socket.io for client
extends layout
block content
h1= title
#disconected
p Desconectado!
#connected.hide
p Conectado!
input(type='button', value='Enviar pulsación')
@donflopez
donflopez / app.js
Created September 2, 2012 17:41
Socket.io for clicks
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http');
var app = express();
@donflopez
donflopez / dooreffect.html
Created September 17, 2012 16:18
HTML of Door effect.
<!DOCTYPE html>
<html>
<head>
<title>CamyDes</title>
<link rel="stylesheet" href="stylesheets/style.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
</head>
<body>
<div class="content"><h1>Hola esto es una prueba</h1></div>
<div class="leftdoor"></div>
@donflopez
donflopez / door.css
Created September 17, 2012 16:46
CSS3 Door
.leftdoor {
position: absolute;
width: 50%;
height: 100%;
background: url(../images/camydesfront.jpg);
background-repeat: no-repeat;
background-position: 0 0;
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-o-background-size: 100% 100%;
@donflopez
donflopez / button.css
Created September 17, 2012 17:16
CSS3 Button
.button {
position: absolute;
top: 50%;
left: 50%;
margin-left: -30px;
width: 60px;
height: 60px;
background: gold;
border-radius: 30px;
text-align: center;
@donflopez
donflopez / transitions.css
Created September 17, 2012 17:38
CSS3 Transitions
.rotate {
-webkit-transition-property: rotate;
-webkit-transition-duration:2s;
-webkit-transition-timing-function:ease;
-webkit-transform:rotate(180deg);
-moz-transition-property: rotate;
-moz-transition-duration:2s;
-moz-transition-timing-function:ease;
-moz-transform:rotate(180deg);
-ms-transition-property: rotate;
@donflopez
donflopez / dooreffect.js
Created September 17, 2012 17:49
Script for door effect
$('.button').mousedown(function(){
$(this).addClass("rotate"); //añade la clase con la transición al botón.
setTimeout(function(){
$('.button').addClass("del"); //Añade la clase del al botón tras 1900 milisegundos.
},1900);
$('.leftdoor').addClass("moveleft"); //Añade la clase con la transición a la puerta izq.
$('.rightdoor').addClass("moveright"); //Añade la clase con la transición a la puerta der.
setTimeout(function(){
$('.rightdoor').addClass("del"); //Elimina la puerta derecha tras 4 segundos.
},4000);
@donflopez
donflopez / dabblet.css
Created January 16, 2013 19:54 — forked from anonymous/dabblet.css
Untitled
.rounded {
width:100px;
height:100px;
border: 1px solid black;
border-radius:30px;
}