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
'use strict'; | |
/* | |
npm install --save-dev gulp-concat-css | |
npm install --save-dev gulp-clean-css | |
npm install --save-dev gulp-rename | |
npm install --save-dev gulp-autoprefixer | |
npm install --save-dev gulp-livereload | |
npm install --save-dev gulp-connect | |
*/ |
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
let array1 = [2, 3, 4]; | |
let array2 = array1.map(function(number) { | |
return number * number; | |
}); | |
// если в фнкции один параметр () можно опустить | |
// если функция делает только возврат {} и return можно опустить | |
let array3 = array1.map(number => number * number); |
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 array = [1,2,[1,2,[[1,2,3],1,2,3],3],3]; | |
function newarr(source) { | |
var res = []; | |
function doit(_source) { | |
_source.forEach(function(e) { | |
if(typeof e === 'number') { | |
// console.log("ok"); | |
res.push(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
<ul id="list"> | |
<li data-temp="1">1</li> | |
<li data-temp="2">2</li> | |
<li data-temp="3">3</li> | |
</ul> | |
list.addEventListener('click', function(e) { | |
console.log(e.target.getAttribute("data-temp")); | |
}); |
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 Calc() { | |
var number = 0; | |
return { | |
add: function(num) { | |
number += num; | |
}, | |
dif: function(num) { | |
number -= num; | |
}, | |
mul: function(num) { |
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
// heroku password | |
heroku auth:token | |
heroku ps:scale web=1 |
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 elemArr = Array.prototype.slice.call( htmlCollection ); | |
// или короче: | |
var elemArr = [].slice.call( htmlCollection ); |
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
sencha -sdk c:/project/extjs/extSDK generate app Your-app-name c:/project/extjs/dockers | |
sencha -sdk (sdk-path) generate app Your-app-name (your-app-path) | |
sencha -sdk c:/project/ext/sdk generate app Generate ./qwerty | |
здесь расположен sdk название приложения папка где будет расположено приложение |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
* { | |
margin: 0; | |
} | |
.header-list { |
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 filter(arr, someFn) { | |
var result = []; | |
for (var i = 0; i < arr.length; i++) { | |
if (someFn(arr[i]) === true) { | |
result.push(arr[i]); | |
} | |
} | |
return result; |