Skip to content

Instantly share code, notes, and snippets.


Sergey Kryvets skryvets

View GitHub Profile
skryvets /
Last active Apr 8, 2021
Stream filter and sort example
In this scenario we create twenty random cars (random model and year).
An expected result is to only get Toyota and sort by year, newest first.
class Scratch {
public static void main(String[] args) {
List<Car> cars = CarFactory.createTwentyRandomCars();
System.out.println("Initial Cars list: " + cars.toString());
skryvets /
Created Apr 8, 2021
Enable logging and statistics of JPA queries
skryvets /
Created Dec 23, 2019
Restart Mac's touchbar
pkill "Touch Bar agent";
killall "ControlStrip";
#or the same with sudo
sudo pkill "Touch Bar agent";
sudo killall "ControlStrip";
skryvets / Gradle dependencies local path MacOS
Last active Jun 13, 2020
Location where Gradle stores dependencies on your local file system when is pulled from MavenCentral or some other remote repository
View Gradle dependencies local path MacOS
View gist:3f2758c2262a5cab175de464a9c26323
public class WebSecurity extends WebSecurityConfigurerAdapter {
public WebSecurity() {}
protected void configure(HttpSecurity http) throws Exception {
skryvets / webpack.config.js
Created Mar 23, 2018
Webpack configuration file
View webpack.config.js
var webpack = require('webpack');
var path = require('path');
var fs = require('fs');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var SvgStore = require('webpack-svgstore-plugin');
var LiveReloadPlugin = require('webpack-livereload-plugin');
var inProduction = process.env.NODE_ENV === 'production';