This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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(a,b){var c,d={},e=function(){},f=function(){d.history=d.history||[],d.history.push(arguments),this.console&&original.log(Array.prototype.slice.call(arguments))},g=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],h=g.length,i=window.console=window.console||{};try{for(;h--;)c=g[h],i[c]="log"==c?f:e}catch(j){}b._unlockConsole=function(){i.log=a,d.history.map(function(a){i.log.apply(i,Array.prototype.slice.call(a))})}}(null!=console&&"object"==typeof console&&"log"in console?console.log:function(){},this); |
This file contains hidden or 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
| /* | |
| * Your Stylesheet | |
| * | |
| * This stylesheet is loaded when Atom starts up and is reloaded automatically | |
| * when it is changed. | |
| * | |
| * If you are unfamiliar with LESS, you can read more about it here: | |
| * http://www.lesscss.org | |
| */ |
This file contains hidden or 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 getWatchers(root) { | |
| root = angular.element(root || document.documentElement); | |
| var watcherCount = 0; | |
| var scopeArr = []; | |
| function getElemWatchers(element) { | |
| var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
| var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
| var watchers = scopeWatchers.concat(isolateWatchers); | |
| angular.forEach(element.children(), function (childElement) { | |
| watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |