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
#!/usr/bin/env node | |
"use strict"; | |
var server_url = 'ws://livetiming.sms-timing.com:10001/'; | |
var WebSocket = require('ws'); | |
var ws = new WebSocket( server_url, { | |
protocolVersion: 13 | |
}); |
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
/** | |
* We need dummy cookie storage that wouldn't save any cookies | |
* or get any cookies | |
*/ | |
public class WebkitCookietHandlerProxy extends CookieHandler { | |
@Override | |
public void put(URI uri, Map<String, List<String>> responseHeaders) throws IOException { | |
if (uri == null || responseHeaders == null) { |
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(angular) { | |
'use strict'; | |
var directives = angular.module('app.directives', []); | |
directives.directive('ngTap', function() { | |
return function(scope, element, attrs) { | |
var tapping; | |
tapping = false; | |
element.bind('touchstart', function(e) { |
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
Мы с гордостью пользуемся open source проектами, и мы хотим делать свой вклад в развитие сообщества. Покажите нам свои навыки и ваше желание улучшать мир open-source выбрав open-source проект и исправив какую-либо из открытых задач/ошибок на Github баг трекере. Добавьте ссылку на ваш pull request к заявке, и объясните почему выбрали именно эту конкретную проблему для исправления. (Замечание: если чувствуете в себе силы, смело добавляйте ссылки на несколько pull requestов, но четко укажите каким именно вы довольны больше всего). | |
Влияние выбранной задачи | |
- Качество кода (корректность, производительность, элегантность) | |
- Читаемость кода и документация (грамотное программирование это плюс) | |
- Тестирование (качественные open-source проекты все равно не примут pull request без них) | |
- Ясная коммуникация в pull request, объясните как вы решили проблему, расскажите о возможных подводных камнях, и предоставьте диалог с поддерживающим(и) проект если возможно. | |
- Секретные бонусные очки если pull request будет слит с осно |
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
var myModule = angular.module(...); | |
myModule.directive('directiveName', function factory(injectables) { | |
var directiveDefinitionObject = { | |
priority: 0, | |
template: '<div></div>', | |
templateUrl: 'directive.html', | |
replace: false, | |
transclude: false, | |
restrict: 'A', |
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
var btnPressed; | |
var distance = [ 0, 0 ]; | |
var coords = [ 0, 0 ]; | |
var trackMovment = function( evt ) { | |
distance[0] += Math.abs( evt.pageX - coords[ 0 ] ); | |
distance[1] += Math.abs( evt.pageY - coords[ 1 ] ); | |
coords[0] = evt.pageX; |
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
// HELPER: #key_value | |
// | |
// Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}} | |
// | |
// Iterate over an object, setting 'key' and 'value' for each property in | |
// the object. | |
Handlebars.registerHelper( "key_value", function ( obj, options ) { | |
var buffer = "", | |
key; |
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
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
padding: 0; | |
margin: 0; | |
} | |
html, body { | |
height: 100%; |
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "quiz", | |
"folder_exclude_patterns": [ "node_modules" ] | |
} | |
], | |
"ternjs": { |
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
console.log(1111111,"hello"),function(e){"use strict";var t=e.body,n=0,r=0,i=0,s=0,o={img:0,text:0},u=/hidden|ad-break|ad_|-ad|ads|agegate|byline|combx|comment|controls|community|date|disqus|extra|facebook|foot|header|links|menu|pager|pagination|popup|print|remark|rss|sidebar|social|share|shoutbox|sidebar|sponsor|time|tags|tools|tweet|twitter|widget/i,a=function(e){for(var t=0,f=e.childNodes.length;t<f;t++){var l=e.childNodes[t];if(l.nodeType!==3&&l.nodeType!==1)continue;if(l.tagName==="SCRIPT"||l.tagName==="IFRAME"||l.tagName==="STYLE"||l.tagName==="FORM"||l.tagName==="INPUT"||l.tagName==="SELECT"||l.tagName==="TEXTAREA"||l.tagName==="HEADER"||l.tagName==="FOOTER"||l.tagName==="ASIDE"||l.tagName==="NOSCRIPT")continue;var c=l.tagName+" "+l.id+" "+l.className;if(c.search(u)!==-1)continue;if(l.nodeType===3){var h=l.textContent.trim().length;h>i&&(i=h),h>200&&s++,n+=h;continue}l.tagName==="A"&&(r+=l.textContent.trim().length),l.tagName==="IMG"&&l.width>400&&l.height>300&&o.img++,(l.tagName==="P"||l.tagName==="LI |
NewerOlder