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 subscribeAllMouseEvents(element) { | |
var evNames = ['mousedown', 'mouseup', 'click', 'dblclick', 'mousemove', 'mouseover', 'mouseout', 'mousewheel' ]; | |
evNames.forEach(function (evName) { | |
element.addEventListener(evName, function(e) { | |
console.log(e); | |
}); | |
}); | |
} |
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
Zpráva z nově provedeného výzkumu agentury Ipsos ve spolupráci se studenty Fakulty | |
sociálních věd Univerzity Karlovy říká, že v Česku vzrostl počet lidí, kteří jsou pro zákaz | |
kouření v restauracích. Pro úplný zákaz kouření by bylo 78 % Čechů, což je poměrně | |
vysoký počet lidí. K nekuřákům se totiž přidávají pomalu ale jistě už i kuřáci. | |
Přitom v roce 2007 podporovalo zákaz jen 13 procent kuřáků, dnes s nevím |
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 cp = require('child_process'); | |
var isWin = /^win/.test(process.platform); | |
var cloneProcess; | |
if (isWin) { | |
cloneProcess = cp.spawn('grunt.cmd', []); | |
}else{ | |
cloneProcess = cp.spawn('grunt'); | |
} |
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 fs = require('fs'); | |
var originalAddMatcherResult = jasmine.Spec.prototype.addMatcherResult; | |
jasmine.Spec.prototype.addMatcherResult = function() { | |
if (!arguments[0].passed()) { | |
browser.takeScreenshot().then(function(png) { | |
var stream = fs.createWriteStream("./screenshot.png"); | |
stream.write(new Buffer(png, 'base64')); | |
stream.end(); | |
}); |
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
<html> | |
<body> | |
<h1>no namespace</h1> | |
</body> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io('/'); | |
socket.emit('my other event', { my: 'data1212' }); | |
</script> | |
</html> |
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
0 info it worked if it ends with ok | |
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe', | |
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', | |
1 verbose cli 'update', | |
1 verbose cli 'grunt-contrib-concat' ] | |
2 info using npm@1.4.14 | |
3 info using node@v0.10.29 | |
4 verbose node symlink C:\Program Files\nodejs\\node.exe | |
5 verbose url raw grunt-contrib-concat | |
6 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-contrib-concat' ] |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
// Let's say we have a model with data | |
var propObj = {}; |
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 runSequentially = function(arr, onEach){ | |
var res = []; | |
var step = function() { | |
return onEach(arr[0]).then(function(resolved) { | |
arr.splice(0,1); | |
resolved.push(res); | |
if (arr.length > 0) { | |
return step(); | |
} else { | |
return res; |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<base href="/"> | |
<title>app</title> | |
</head> | |
<body> | |
<button ng-click="loginGH()">Login</button> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Angulars Material CSS now available via Google CDN; version 0.6 used here --> | |
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/angular_material/0.6.1/angular-material.min.css"> | |
<!-- Angular Material Dependencies --> | |
<script src="//cdn.jsdelivr.net/hammerjs/2.0.4/hammer.min.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.min.js"></script> |
OlderNewer