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
λ docker run --name rabbitmq rabbitmq:3 | |
λ docker run -it --rm --name rabbitmq-management -p 5672:5672 -p 15672:15672 rabbitmq:3-management |
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
git checkout beta | |
# rename master to alpha | |
git push origin :master alpha | |
# delete master locally | |
git branch -D master | |
# rename live to master | |
git push origin :live master |
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
;= @echo off | |
;= rem Call DOSKEY and use this file as the macrofile | |
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0% | |
;= rem In batch mode, jump to the end of the file | |
;= goto:eof | |
;= Add aliases below here | |
e.=explorer . | |
p.=phpstorm . | |
gs=git status | |
gaa=git add . |
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
;= @echo off | |
;= rem Call DOSKEY and use this file as the macrofile | |
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0% | |
;= rem In batch mode, jump to the end of the file | |
;= goto:eof | |
;= Add aliases below here | |
e.=explorer . | |
gl=git log --oneline --all --graph --decorate $* | |
ls=ls --show-control-chars -F --color $* | |
pwd=cd |
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
const sumArray = arr => ((arr == null) || (arr.length < 2)) ? 0 : arr.reduce((a, b) => a + b, 0) - Math.max(...arr) - Math.min(...arr); |
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 remove(s){ | |
return s.replace(/!+$/, '') | |
} |
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 remove(s){ | |
return s.replace(/!+([^!])/g, '$1') | |
} |
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 remove(s){ | |
return (s.slice(-1) == '!') ? s.substring(0, s.length - 1) : s; | |
} |
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
<?php | |
//$input = '44.60855718,33.5143017'; | |
if (!($input)) $output = ''; | |
$someshit = explode(',', $input); | |
$someshit = array_reverse($someshit); | |
$mystring = implode('%2C', $someshit); | |
// echo $mystring; | |
$output = '<script src="http://panoramas.api-maps.yandex.ru/embed/1.x/?lang=ru_UA&l=stv&ll=' . $mystring .'&ost=dir%3A36.6150270900669%2C0~spn%3A89.99999987427145%2C39.71042873864211&size=450%2C400"></script>'; | |
return $output; |
NewerOlder