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
'use strict'; | |
let appCaches = [{ | |
name: 'app', | |
urls: [ | |
'/app/', | |
'/' | |
] | |
}, { | |
name: 'offline', |
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 getDatesRangeArray = function(startDate, endDate, unit, step) { | |
// console.log("getDatesRangeArray", arguments); | |
var interval = { | |
unit_: unit || 'hours', | |
step_: step || 1 | |
}, | |
dateArray = [], | |
currentDate = startDate; | |
// console.log("currentDate", currentDate); | |
while (currentDate <= endDate) { |
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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_with_fields": true, | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 1, | |
"caret_style": "blink", |
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() { | |
'use strict'; | |
angular | |
.module('app') | |
.filter('STRING_LIMIT_FILTER', function() { | |
return function(input, num) { | |
let output = input.split(' ').slice(0, num).join(' '); | |
return output; |
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
#!/bin/bash | |
# call as `sh servlet.sh <node uuid> <node ip> <url> [servlet type]` | |
# exmaple sh servlet.sh 595e341fd7391071d21ce1b5 20.20.1.73 /servlet/acme/ CompareServer-0 | |
header="Content-Type: application/json" | |
enc=$(gshuf -i 0-1000 -n 1) #generate random number (in unix use shuf , remove prefix g) | |
dec=$(gshuf -i 10-600 -n 1) | |
now=$(gdate +%s%3N) #generate current time in miliseconds ( in unix use date, remove prefix g ) | |
uuid=$1 #first argument | |
ip=$2 #second argument | |
url_less=${3%/} #remove trailing slash, if any |
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
#!/bin/bash | |
# call as `sh app.sh -u <app uuid> -i <app ip> -t <url>` | |
# exmaple sh app.sh -u 595e341fd7391071d21ce1b5 -i 20.20.1.73 -t /monitor/application/acme/ | |
# if you do not want to use - argument than comment while loop and uncomment commented uuid and ip | |
while getopts u:i:t: option | |
do | |
case "${option}" | |
in | |
u) uuid=${OPTARG};; | |
i) ip=${OPTARG};; |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"extends": "eslint:recommended", | |
"globals": { | |
"angular": true, | |
"module": true, |
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
{ | |
"browser": true, | |
"esnext": true, | |
"node": true, | |
"immed": true, | |
"globals" : { | |
"moment": true, | |
"angular": true, | |
"saveAs": true, | |
"require": true |
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
{ | |
"fileExtensions": [".less", ".css"], | |
"excludedFiles": ["vendor.less"], | |
"spaceAfterPropertyColon": { | |
"enabled": true, | |
"style": "one_space" // Comments are allowed | |
}, | |
"singleLinePerSelector": 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
# git branch in prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[1;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[1;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" |
OlderNewer