Skip to content

Instantly share code, notes, and snippets.

from socket import *
print "*** Client - Welcomato nella chat a turni ***\n"
IP = 'localhost'
PORT = 4000
ADS = (IP, PORT)
tcpsoc = socket(AF_INET, SOCK_STREAM)
tcpsoc.connect(ADS)
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
@Fabryz
Fabryz / index.html
Created April 3, 2011 10:04
NowJS Introduction: Simple Chat Server in 12 Lines of Code
<!DOCTYPE html>
<html>
<head>
<title>NowJS test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="/nowjs/now.js"></script>
<script>
$(document).ready(function() {
now.name = prompt("What's your name?", "");
now.receiveMessage = function(name, msg) {
@Fabryz
Fabryz / gist:1176665
Created August 28, 2011 13:25
Locking error
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: Application is locked while it is being stopped
error: at [object Object].stop (/root/nodejitsu/lib/nodejitsu/resources/app/controller.js:411:21)
error: at Object.<anonymous> (/root/nodejitsu/lib/nodejitsu/resources/app/service.js:165:25)
error: at Object.<anonymous> (/root/nodejitsu/node_modules/journey/lib/journey.js:257:46)
error: at Object.go (/root/nodejitsu/node_modules/journey/lib/journey.js:423:33)
error: at /root/nodejitsu/node_modules/journey/lib/journey.js:349:30
error: at /root/nodejitsu/node_modules/journey/lib/journey.js:281:39
@Fabryz
Fabryz / gist:1176680
Created August 28, 2011 13:42
The damn favicon error
data: 2011-08-28T13:39:26.727Z: Error: No such file or directory
data: 2011-08-28T13:39:26.727Z: at /usr/local/src/Fabryz/wander/wanjitsu/server.js:67:20
data: 2011-08-28T13:39:26.727Z: at callbacks (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:272:11)
data: 2011-08-28T13:39:26.727Z: at param (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:246:11)
data: 2011-08-28T13:39:26.727Z: at pass (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:253:5)
data: 2011-08-28T13:39:26.727Z: at Router._dispatch (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:280:4)
data: 2011-08-28T13:39:26.727Z: at Object.handle (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:45:10)
data: 2011-08-28T13:39:26.727Z: at next (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/node_modules/connect/lib/http.js:19...
data: 2011-08-28T13:3
data: 2011-08-28T14:15:23.568Z: Error: No such file or directory
data: 2011-08-28T14:15:23.568Z: at /usr/local/src/Fabryz/wander/wanjitsu/server.js:67:20
data: 2011-08-28T14:15:23.568Z: at callbacks (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:272:11)
data: 2011-08-28T14:15:23.568Z: at param (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:246:11)
data: 2011-08-28T14:15:23.568Z: at pass (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:253:5)
data: 2011-08-28T14:15:23.568Z: at Router._dispatch (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:280:4)
data: 2011-08-28T14:15:23.568Z: at Object.handle (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:45:10)
data: 2011-08-28T14:15:23.568Z: at next (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/node_modules/connect/lib/http.js:19...
data: 2011-08-28T14:1
@Fabryz
Fabryz / gist:1176722
Created August 28, 2011 14:21
Express favicon error
data: 2011-08-28T14:15:55.055Z: Error: No such file or directory
data: 2011-08-28T14:15:55.055Z: at /usr/local/src/Fabryz/wander/wanjitsu/server.js:67:20
data: 2011-08-28T14:15:55.055Z: at callbacks (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:272:11)
data: 2011-08-28T14:15:55.055Z: at param (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:246:11)
data: 2011-08-28T14:15:55.055Z: at pass (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:253:5)
data: 2011-08-28T14:15:55.055Z: at Router._dispatch (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:280:4)
data: 2011-08-28T14:15:55.055Z: at Object.handle (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/lib/router/index.js:45:10)
data: 2011-08-28T14:15:55.055Z: at next (/usr/local/src/Fabryz/wander/wanjitsu/node_modules/express/node_modules/connect/lib/http.js:198:15)
data: 2011-08-28T14
@Fabryz
Fabryz / gist:1176922
Created August 28, 2011 17:03
Nodester error on /status
Error: failed to locate view "status"
at Function.compile (/node_modules/express/lib/view.js:58:15)
at ServerResponse._render (/node_modules/express/lib/view.js:416:18)
at ServerResponse.render (/node_modules/express/lib/view.js:317:17)
at Router.<anonymous> (/app/server.js:70:9)
at done (/node_modules/express/lib/router/index.js:250:22)
at middleware (/node_modules/express/lib/router/index.js:244:9)
at param (/node_modules/express/lib/router/index.js:227:11)
at pass (/node_modules/express/lib/router/index.js:232:6)
at Router._dispatch (/node_modules/express/lib/router/index.js:255:4)
@Fabryz
Fabryz / index.html
Created August 29, 2011 20:51
HTML5 canvas overlay bug?
<!DOCTYPE html>
<html>
<head>
<title>Wander game</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="./css/style.css" media="screen">
<script type="text/javascript" src="./js/jquery-latest.min.js"></script>
fabryz@fabryz-laptop ~/www/wanjitsu $ jitsu logs app wander
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command logs app wander
info: Authenticated as Fabryz
error: Error running command logs app wander
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: socket hang up
error: at CleartextStream.<anonymous> (http.js:1290:45)