Skip to content

Instantly share code, notes, and snippets.

@rzenkov
rzenkov / docker-compose.yml
Created July 7, 2020 12:11
Simple php config
version: '3'
networks:
docker-project:
services:
php:
image: php:fpm
container_name: php
ports:
set -g base-index 1
unbind C-b
set-option -g prefix M-j
bind-key M-j send-prefix
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@rzenkov
rzenkov / gist:6896637
Created October 9, 2013 05:29
spring mvc web.xml part
<filter>
<filter-name>hiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttppMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hiddenHttpMethodFilter</filter-name>
<url-pattern>/<url-pattern>
<servlet-name>appServlet</servlet-name>
</filter-mapping>
@rzenkov
rzenkov / gist:6865886
Created October 7, 2013 10:42
Search in 1cv77.mlg
#iconv usage for 1cv77.mlg
iconv -f cp1251 1cv77.mlg | grep "2013.*\$Изменение.*
@rzenkov
rzenkov / MyWebConfig
Created October 1, 2013 12:45
Configuring spring mvc without context.xml
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@rzenkov
rzenkov / MyWebInit
Created October 1, 2013 12:44
Configuring spring mvc without web.xml
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
public class MyWebInit extends AbstractAnnotationConfigDispatcherServletInitializer{
@Override
protected Class<?>[] getRootConfigClasses(){
return null;
}
@Override
protected Class<?> [] getServletConfigClasses() {