This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.objKeys= function(o){ | |
return angular.isObject(o) ? Object.keys(o) : []; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.controller('myCtrl', function(){ | |
var Controller = function($scope) { | |
var that = this; | |
this.$scope = $scope; | |
this.init.apply(this,[].slice.call(arguments,0)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://localhost'); | |
socket.on('news', function (data) { | |
console.log(data); | |
}); | |
socket.emit('setinfo',{'bella merda':navigator.userAgent}) | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://localhost'); | |
socket.on('news', function (data) { | |
console.log(data); | |
}); | |
socket.emit('my other event', { my: 'data' }); | |
</script> | |
Ciao, sono un piccolo socket.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function me(){ | |
$.ajax( "http://127.0.0.1:8080/channel1/?token="+parseInt(Math.random()*10e2)+"&else=boo" ) | |
.done(me) | |
.fail(me) | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//no limite di tempo | |
set_time_limit(0); | |
//error_reporting(E_RECOVERABLE_ERROR); | |
//include 'ACometResponse.php'; | |
class CometServer { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (q) { | |
window.a = function (d) { | |
while (d.results.length) document.body.innerHTML += '<li>' + d.results.pop().text; | |
}; | |
var js = document.createElement('script'), | |
first = document.getElementsByTagName('script')[0]; | |
js.src = 'http://search.twitter.com/search.json?q=' + q + '&callback=a'; | |
first.parentNode.insertBefore(js, first); | |
})('upcloo'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ready = function (doc) { | |
function dispatch() { | |
hasRun = 1; | |
for (var i = 0, l = queue.length; i < l; i++) queue[i]() | |
} | |
var hasRun = 0, | |
queue = [], | |
d, e, f = !1, | |
aElem = doc.createElement("a"), | |
dloaded = "DOMContentLoaded", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"*3\r\n$3\r\nSET\r\n$"+length("mynamespace:"+cells["Column 1"].value)+"\r\n"+cells["Column 1"].value+"\r\n$"+length(cells["Column 2"].value)+"\r\n"+cells["Column 2"].value+"\r\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (c,p){var F = function(){}; F.prototype = p.prototype;c.prototype = new F();} |