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 class JsonFlattener { | |
private final String jsonString; | |
public JsonFlattener(String json) { | |
this.jsonString = json; | |
} | |
public Map<String, String> flattenToMap() throws IOException { | |
Map<String, String> valueMap = new HashMap<>(); |
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
# First thing First! Update! Upgrade! | |
sudo apt-get update && sudo apt-get -y upgrade | |
# Fixing Time problem by keeping RTC in local time (for dual boot with windows 10) | |
sudo timedatectl set-local-rtc 1 --adjust-system-clock | |
# Install vim | |
sudo apt-get install -y vim | |
# Download Chrome and install it. |
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
# Add following location directive to the default server block located in | |
# /etc/nginx/conf.d/default.conf (if you installed from official NGINX repository) or, | |
# /etc/nginx/sites-enabled/default (if you installed from Debian or Ubuntu repositories) | |
# This location directive serve static content from the root | |
location /shared { | |
root /root/directory/of/files/; | |
autoindex on; | |
} |
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
#1 201 Core Java Interview Questions (** this 200 will cover the maximum topics) | |
https://www.javatpoint.com/corejava-interview-questions | |
#2 String | |
a. String in basic | |
- https://www.javatpoint.com/java-string | |
b. String vs StringBuilder vs StringBuffer | |
- https://www.geeksforgeeks.org/g-fact-27-string-vs-stringbuilder-vs-stringbuffer/ | |
- http://javarevisited.blogspot.com/2011/07/string-vs-stringbuffer-vs-stringbuilder.html | |
- https://www.journaldev.com/538/string-vs-stringbuffer-vs-stringbuilder |
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
# you should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# | |
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
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
$ ssh-keygen -t rsa -C "<work-email>" | |
~/.ssh/id_rsa | |
~/.ssh/id_rsa_<work-id> | |
$ ssh-add -D | |
$ ssh-add ~/.ssh/id_rsa | |
$ ssh-add ~/.ssh/id_rsa_<work-id> | |
$ ssh-add -l |
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
apply plugin: 'java' | |
apply plugin: 'war' | |
group = 'sample.web' | |
version = '0.0.1-SNAPSHOT' | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
tasks.withType(JavaCompile) { |
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
-- To see what timezone your MySQL session is using, just execute this: | |
SELECT @@global.time_zone, @@session.time_zone; | |
-- If you feel to Change on your specific TimeZone, execute: | |
SET GLOBAL time_zone = '+6:00'; | |
SET SESSION time_zone = '+6:00'; |
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
sudo apt-get update | |
sudo apt-get install mysql-server | |
sudo mysql_secure_installation |
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
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
NewerOlder