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 maxLength(a, k) { | |
let result = 0; | |
for (let i = 0; i < a.length; i++) { | |
let arr = []; | |
if (a[i] <= k) { | |
let arraySum = 0; | |
for (let j = i; j < a.length; j++) { | |
if (arraySum + a[j] <= k) { | |
arraySum += a[j]; | |
arr.push(a[j]); |
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
#!/usr/bin/env sh | |
# остановить публикацию при ошибках | |
set -e | |
# сборка | |
npm run build | |
# переход в каталог сборки | |
cd dist |
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> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<style> |
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 () { | |
var pop = {}; | |
pop.shown = false; | |
pop.item = $('.popover'); | |
$('body').on('click', function(e){ | |
if ( e.target.className == 'button-block' ){ | |
if ( pop.shown == true ){ | |
pop.item.hide(); | |
pop.shown = false; |
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
rsync -av --ignore-existing --exclude-from '[excludefile]' [srcpath] [dstpath] |
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 saveLog( $data ) | |
{ | |
$logname = date("Ymd") . ".log.txt"; | |
$handle = fopen($logname, "a+"); | |
if ($handle !== false) { | |
fwrite($handle, $data . PHP_EOL); | |
fclose($handle); | |
} else { | |
throw new Exception("saveLog fopen error"); |
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> | |
<body> | |
<div id="src">Source here...</div> | |
<div id="editor" contenteditable="true"> | |
<p>Place MS-Word text here...</p> | |
</div> | |
</body> | |
</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
OIFS="$IFS" | |
IFS=$'\n' |
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
wget --spider -o wget.log -e robots=off --wait 3 -r -p -S http:// | |
grep -ri 'http://' wget.log | grep -E -v '(files/|\.jpg|\.jpeg|\.gif|\.css|\.js|\.pdf|\.png|\.xls)' | awk '{print $3}'|sort|uniq|sort > site_map.txt | |
cat $1 |grep -i -E -v '(\.jpg|\.jpeg|\.gif|\.css|\.js|\.pdf|\.png|\.xls|\.ico|\.txt|\.doc|yandexbot|googlebot|YandexDirect|\/upload\/|" 404 |" 301 |" 302 )'|perl -MURI::Escape -lne 'print uri_unescape($_)'|grep yandsearch|awk '{print $1}'|sort|uniq|wc -l |
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
wget -w 1 -r --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains DOMAIN --no-parent FOLDER/ |
NewerOlder