Skip to content

Instantly share code, notes, and snippets.

@valeriuzdrobau
valeriuzdrobau / WebappSpringConfig.java
Created July 13, 2018 14:15 — forked from anthavio/WebappSpringConfig.java
spring-security java exploded configuration
@Configuration
@PropertySource(CoreSpringConfig.PROPERTIES)
public class WebappSpringConfig {
@Autowired
private Environment environment;
/**
* 'springSecurityFilterChain' is Magic ID and it is required by Spring Security DelegatingFilterProxy in web.xml
*
@valeriuzdrobau
valeriuzdrobau / CustomSchemaValidationConfiguration.java
Created February 8, 2018 07:28 — forked from jelies/CustomSchemaValidationConfiguration.java
Custom Hibernate schema validator that collects all the validation errors to display them all together instead of crashing one by one. Using Hibernate 3.6.4.
package com.jelies.hibernate.validation;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
import org.apache.log4j.Logger;
import org.hibernate.HibernateException;
@valeriuzdrobau
valeriuzdrobau / dev-machine.sh
Created April 22, 2017 05:56
Install all the necessary tools for a developer machine on Ubuntu 14.04
#!/bin/bash
# All the configuration settings described below were found on the internet,
# and this script just automates it
# Generating locales
sudo locale-gen en_US en_US.UTF-8 pt_BR pt_BR.UTF-8 es_ES es_ES.UTF-8
# Installing base packages
sudo apt-get update
@valeriuzdrobau
valeriuzdrobau / startup-app.sh
Created November 29, 2016 07:53 — forked from touv/startup-app.sh
Startup script for Express / Node.js application with the forever module
#!/bin/sh
##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
##
## Debian / Linux / Ubuntu / LSB
## Startup script for Express / Node.js application with the forever module
##
##
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin
##
##