This is an example how to setup swagger docs api endpoint for your koa app.
const Koa = require('koa');
const path = require('path');
const http = require('http');
const swagger = require('./swagger');
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
// browser way | |
navigator.serviceWorker.getRegistrations().then(registrations => { | |
for (const registration of registrations) { | |
registration | |
.unregister() | |
.then(boolean => { | |
console.log( | |
boolean ? 'Successfully unregistered' : 'Failed to unregister', | |
`ServiceWorkerRegistration\n${ | |
registration.installing |
var loaderUtils = require("loader-utils"); | |
module.exports = function createImporter(options) { | |
return function(url, fileContext, done) { | |
if (options.test.test(url)) { | |
var request = loaderUtils.urlToRequest(url); | |
loaderContext.loadModule(request, function(err, source) { | |
if (err) return done(new Error(err)); |
{ | |
ar: "عربي", // Арабский | |
az: "Azərbaycan", // Азербайджанский | |
be: "Беларускі", // Беларусский | |
bg: "Български", // Болгарский | |
bs: "Bosanski", // Боснийский | |
ca: "Català", // Каталанский | |
cs: "Čeština", // Чешский | |
da: "Dansk", // Датский | |
de: "Deutsch", // Немецкий |
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-moz-@{display}"; |
#Kottans.Fin
##Сообщества
List of various russian-speaking IT-related chats
##Tests
‘Testing’ your knowledge
Front-end Job Interview Questions
##Stay in the loop Front-end TechnologiES
(function addXhrProgressEvent($) { | |
// Patch for progress event support | |
var originalXhr = $.ajaxSettings.xhr; | |
$.ajaxSetup({ | |
progress: $.noop, | |
xhr: function() { | |
var xhr = originalXhr(), that = this; | |
if (xhr) { | |
if (typeof xhr.addEventListener == "function") { |
Forked from Captain Anonymous's Pen LEEOpG.
A Pen by Sviatoslav on CodePen.