Skip to content

Instantly share code, notes, and snippets.

@v-r
v-r / export_git_tree.txt
Created August 30, 2013 19:50
export git diff tree
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD | xargs zip lorem_module.zip
@v-r
v-r / web.xml
Created August 30, 2013 20:51
initial web.xml for spring
<?xml version="1.0" encoding="UTF-8" ?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Archetype Created Web Application</display-name>
</web-app>
@v-r
v-r / gist:6401512
Created September 1, 2013 00:21
spring config with json
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
@v-r
v-r / gist:6428079
Created September 3, 2013 18:57
spring mvc with jpa pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.Lorem</groupId>
<artifactId>Todo</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Todo Maven Webapp</name>
<url>http://maven.apache.org</url>
@v-r
v-r / jpaContext.xml
Created September 4, 2013 07:31
jpaConfig.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<context:annotation-config />
<context:component-scan base-package="com.lorem.Todo" />
INSERT INTO `search_tmp_5cd1b4ae222eb9_22190229` SELECT `main_select`.`entity_id`, SUM(score) AS `relevance` FROM (SELECT DISTINCT `search_index`.`entity_id`, (((0) + (0) + (0) + (0) + (0) + (0)) * 1) AS `score` FROM `catalog_product_index_eav` AS `search_index` INNER JOIN `catalog_product_index_eav` AS `try_clothing_size_filter_filter` ON `search_index`.`entity_id` = `try_clothing_size_filter_filter`.`entity_id` AND `try_clothing_size_filter_filter`.`attribute_id` = 239 AND `try_clothing_size_filter_filter`.`store_id` = 3 INNER JOIN `catalog_product_index_eav` AS `try_shoes_size_filter_filter` ON `search_index`.`entity_id` = `try_shoes_size_filter_filter`.`entity_id` AND `try_shoes_size_filter_filter`.`attribute_id` = 267 AND `try_shoes_size_filter_filter`.`store_id` = 3 INNER JOIN `catalog_product_index_eav` AS `try_subcategory_filter` ON `search_index`.`entity_id` = `try_subcategory_filter`.`entity_id` AND `try_subcategory_filter`.`attribute_id` = 195 AND `try_subcategory_filter`.`store_id` = 3 INNER JOI
DELETE FROM `catalog_product_index_eav` WHERE (entity_id IN('125073', '125074', '125075', '125076', 125388))
DELETE FROM `catalog_product_index_eav` WHERE (entity_id IN('125073', '125074', '125075', '125076', 125388))
[actions.removeItem.receive]: (state, { count, error }) => {
// ...
if (error) {
return initialState;
}
// …
if (count => 1) {
return initialState;
}
@v-r
v-r / puzzler.js
Created January 13, 2021 12:28
vaimo cms
const reducerMap = {
[actions.removeItem.receive]: (state, { count, error }) => {
// ...
if (error) {
return initialState;
}
// …
if (count => 1) {
return initialState;