Skip to content

Instantly share code, notes, and snippets.

@slezhnin
slezhnin / vimrc
Last active September 22, 2017 11:44
My vimrc
" My vim config
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
" call plug#begin('~/vimfiles/plugged')
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
@slezhnin
slezhnin / java_interview_topics.md
Last active October 10, 2019 08:50
Java interview topic list

Java Language

Classes and Objects

QA

Q:

  1. What's wrong with the following program?

public class SomethingIsWrong {

import java.util.HashMap;
import java.util.Map;
public abstract class Digest {
private Map<byte[], byte[]> cache = new HashMap<byte[], byte[]>();
public byte[] digest(byte[] input) {
byte[] result = cache.get(input);
if (result == null) {
synchronized (cache) {
@slezhnin
slezhnin / oracle-run.sh
Last active May 6, 2020 13:26
oracle-run.sh
#!/bin/sh
# Run the Oracle Database in a Docker Container
# See https://github.com/oracle/docker-images
# The Docker repo name
# Use "oracle/database" if you've built images from the git repo above.
# This is my private repo.
REPO="sirius1/dev"
@slezhnin
slezhnin / eclipse-java-sirius-style-formatting.xml
Created July 14, 2022 13:33
Eclipse Java Sirius Style Formatter Settings for VSCode ("java.format.settings.url": ".vscode/eclipse-java-sirius-style-formatting.xml")
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- "java.format.settings.url": ".vscode/eclipse-java-sirius-style-formatting.xml" -->
<profiles version="22">
<profile kind="CodeFormatterProfile" name="SiriusStyle" version="22">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>