This file contains hidden or 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
| mongodump --port 27017 --username admin --password pass --authenticationDatabase admin --gzip --archive=/data/mongo3.2/backup/mongodump-2016-11-10.gz |
This file contains hidden or 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
| import java.sql.Connection; | |
| import java.sql.PreparedStatement; | |
| import java.sql.SQLException; | |
| import org.springframework.jdbc.core.JdbcTemplate; | |
| import org.springframework.jdbc.core.PreparedStatementCreator; | |
| import org.springframework.jdbc.support.GeneratedKeyHolder; | |
| import org.springframework.jdbc.support.KeyHolder; | |
| public void insert() { |
This file contains hidden or 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 admin | |
| db.createUser( | |
| { | |
| user: "admin", | |
| pwd: "pass", | |
| roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] | |
| } | |
| ) |
This file contains hidden or 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
| package com.rich.stream; | |
| import java.util.HashMap; | |
| import java.util.LinkedHashMap; | |
| import java.util.Map; | |
| import static java.util.stream.Collectors.*; | |
| public class SortMapByValue { | |
| public static void main(String[] args) { |
This file contains hidden or 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
| package com.rich.api.config; | |
| import java.util.Arrays; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import springfox.documentation.builders.ApiInfoBuilder; | |
| import springfox.documentation.builders.PathSelectors; | |
| import springfox.documentation.builders.RequestHandlerSelectors; |
This file contains hidden or 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
| import java.io.FileInputStream; | |
| import java.math.BigInteger; | |
| import java.security.KeyStore; | |
| import javax.net.ssl.KeyManager; | |
| import javax.net.ssl.KeyManagerFactory; | |
| import javax.net.ssl.SSLContext; | |
| import javax.net.ssl.SSLSession; | |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import javax.net.ssl.TrustManager; |
This file contains hidden or 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
| package com.rich.service; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| import java.security.KeyManagementException; | |
| import java.security.KeyStoreException; | |
| import java.security.NoSuchAlgorithmException; | |
| import org.junit.After; | |
| import org.junit.AfterClass; |
This file contains hidden or 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
| @EnableAutoConfiguration(exclude = { | |
| org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class, | |
| org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration.class}) | |
| public class Application { | |
| public static void main(String[] args) { | |
| SpringApplication.run(Application.class, args); | |
| } | |
| } |
This file contains hidden or 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
| import static java.lang.System.out; | |
| import java.util.ArrayList; | |
| import java.util.Comparator; | |
| import java.util.List; | |
| import java.util.stream.Collectors; | |
| public class Main { | |
| private static List<Song> generateSongs() { |
This file contains hidden or 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
| package com.example; | |
| import static java.lang.System.out; | |
| import java.util.*; | |
| import java.util.function.BinaryOperator; | |
| import java.util.stream.Collectors; | |
| public class Main { |