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
private String withMyIP() { | |
StringBuilder stringBuilder = new StringBuilder(); | |
try { | |
URL checkIP = new URL("http://checkip.amazonaws.com"); | |
try (InputStream inputStream = checkIP.openStream(); | |
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream))) | |
{ | |
while (bufferedReader.ready()) stringBuilder.append(bufferedReader.readLine()).append(" "); | |
} | |
} |
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
^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$ |
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
chown -R USER:GROUP ~/.ssh | |
chmod 700 ~/.ssh | |
chmod 644 ~/.ssh/* | |
chmod 600 ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/id_dsa |
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 bash | |
# | |
# OpenVPN helper to add DHCP information into systemd-resolved via DBus. | |
# Copyright (C) 2016, Jonathan Wright <jon@than.io> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
14:38:50.752 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService | |
14:38:50.757 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService | |
924 | |
310 | |
Trying remove: \\srv-fs.eatmeat.ru\common_new\11_Фин_служба\Внутренняя\ОТДЕЛ ФАиП\Анализ фин отчетности\ROMI\ROMI-2017, ROI-2017\ROMI-2017_РК_НГ-2018 (ноя.17-янв.18)\ROMI-2017_4.2_161205_Халилюлина_Паспорт КПЭ-1.1_ROMI-ПЛАН_Исправления.xlsx (31 megabytes, attributes: 150712.08,{lastAccessTime=2016-12-08T14:48:33.25994Z, lastModifiedTime=2016-12-07T17:51:57.864815Z, creationTime=2016-12-08T14:48:33.25994Z, hidden=false, isRegularFile=true, fileKey=null, archive=true, system=false, size=33267041, readonly=false, isSymbolicLink=false, attributes=8224, isOther=false, isDirectory=false}) | |
Trying remove: \\srv-fs.eatmeat.ru\common_new\04_ОДО\Внутренняя\РАБОЧИЕ ОТЧЕТЫ по итогам каждого месяца\АРХИВ\РАБОЧИЕ ОТЧЕТЫ по итогам каждого месяца 2015г\08_Август\CRM\Фотоотчет А |
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
public void spMailLaunch() { | |
Map<Date, String> datesAndSubjects = new HashMap<>(); | |
Callable<Message[]> mailMsgCall = new MailMessages(); | |
try{ | |
Message[] mailMsg = mailMsgCall.call(); | |
for(Message mail : mailMsg){ | |
if(mail.getSubject().toLowerCase().contains("speed:")){ | |
datesAndSubjects.put(mail.getSentDate(), mail.getSubject().toLowerCase().replaceFirst("\\Qspeed:\\E", "")); | |
} | |
if(mail.getSubject().toLowerCase().contains("speed: ")){ |
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
class ObjectPoll{ | |
List<PooledObject> free = new LinkedList<>(); | |
List<PooledObject> used = new LinkedList<>(); | |
PooledObject getPooledObject(){ | |
if (free.isEmpty()){ | |
PooledObject pooledObject = new PooledObject(); | |
free.add(pooledObject); | |
return pooledObject; | |
}else { |
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
public static void main(String[] args) { | |
List<String>ipsFromDb=ipsFromDB(); | |
System.out.println(" ipsFromDb.size() = " + ipsFromDb.size()); | |
HashMap<String,String> ipsMaps = nameAndIpMap(ipsFromDb); | |
BiConsumer<String,String> consumer = (x,y)->{ | |
System.out.println("x = " + x); | |
System.out.println("y = " + y); | |
}; | |
System.out.println(ipsMaps.size()); | |
} |
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
"C:\Program Files\Java\jdk-9.0.1\bin\java" -javaagent:C:\Users\ikudryashov.EATMEAT\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\172.4574.11\lib\idea_rt.jar=60324:C:\Users\ikudryashov.EATMEAT\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\172.4574.11\bin -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk-9.0.1\lib\jsoup-1.11.2.jar;C:\Users\ikudryashov.EATMEAT\IdeaProjects\Weather\out\production\Weather;C:\Users\ikudryashov.EATMEAT\IdeaProjects\Weather\parser\ru\vachok\spb\res\lib\jsoup-1.11.2.jar;C:\Users\ikudryashov.EATMEAT\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\172.4574.11\lib\groovy-all-2.4.6.jar;C:\Users\ikudryashov.EATMEAT\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\172.4574.11\lib\junit.jar;C:\Users\ikudryashov.EATMEAT\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\172.4574.11\redist\annotations-java8.jar" ru.vachok.spb.Main | |
День | |
Пасмурно. Небольшой дождь. | |
-1..+1 | |
758 | |
85% | |
[Ю] 3-5 м/с | |
День | |
Пасмурно. Небольшой дождь. | |
-1..+1 |