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
:set number | |
:set mouse=a " set cursor on click | |
:set autoindent | |
:set tabstop=4 | |
:set shiftwidth=4 " amount of spaces for tab | |
:set smarttab | |
" :set guifont=DroidSansMono_Nerd_Font:h11 | |
call plug#begin('~/.config/nvim/plugged') |
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
Timestamp timstamp = new Timestamp(); | |
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy"); | |
String parsedDate = formatter.format(new Date(timstamp.getTime())); |
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
FROM gradle:5.6.2-jdk8 as builder | |
USER root | |
COPY --chown=gradle:gradle . /builder | |
WORKDIR /builder | |
ADD . /builder | |
RUN gradle fatJar | |
FROM openjdk:8-jre-slim | |
#RUN mkdir /app | |
WORKDIR /app |
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
@Autowired | |
RestTemplate restTemplate; | |
@Bean | |
public RestTemplate restTemplate() { | |
return new RestTemplate(clientHttpRequestFactory()); | |
} | |
private ClientHttpRequestFactory clientHttpRequestFactory() { |
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> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.6.0/redux.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
let pendingRequests = 0; | |
function toQueryString(obj) { | |
let parts = [], | |
i; | |
for (i in obj) { | |
if (obj.hasOwnProperty(i) && obj[i]) { | |
parts.push(encodeURIComponent(i) + "=" + encodeURIComponent(obj[i])); | |
} | |
} |
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 repack(obj, child,_height){ | |
var childTop = child.offset().top; | |
var childLeft = child.offset().left; | |
obj.css("position","absolute"); | |
obj.offset({top:childTop, left:childLeft}); | |
obj.children().each(function(indx, elem){ | |
$(elem).offset({top:$(elem).offset().top-childTop, | |
left:$(elem).offset().left-childLeft}); | |
}); | |
obj.width(child.width()+15); |
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
var slider1 = $('.slider1'); | |
var yStart1 = -700; | |
var yEnd1 = 0; | |
var xx1 = 0; | |
var slider2 = $('.slider2'); | |
var yStart2 = 50; | |
var yEnd2 = 610; | |
var xx2 = 964; | |
var slider2Top; |
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
var options1 = { | |
bar: $('.bar1'), | |
delay: 1300, | |
duration: 300 | |
}; | |
var bm1 = new barManager(options1); | |
bm1.start(); |
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
// shows which worker handle requests | |
app.use((req, res, next) => { | |
const cluster = require('cluster'); | |
if(cluster.isWorker) { | |
console.log('Исполнитель ' + cluster.worker.id + ' получил запрос'); | |
next(); | |
} | |
next(); | |
}); |
NewerOlder