Skip to content

Instantly share code, notes, and snippets.

<canvas id="sakura"></canvas>
<div class="btnbg">
</div>
<!-- sakura shader -->
<script id="sakura_point_vsh" type="x-shader/x_vertex">
uniform mat4 uProjection;
uniform mat4 uModelview;
uniform vec3 uResolution;
uniform vec3 uOffset;
@junjun-dachi
junjun-dachi / mssql-delete-tables.sql
Created September 12, 2017 01:45
mssql-delete-tables.sql
DECLARE @sql NVARCHAR(max)=''
SELECT @sql += ' Drop table ' + QUOTENAME(TABLE_SCHEMA) + '.'+ QUOTENAME(TABLE_NAME) + '; '
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME like 'et_ticket%'
Exec Sp_executesql @sql
@junjun-dachi
junjun-dachi / console log
Created July 11, 2017 01:58
Spring MVC Java Config : Part 4 Spring Security for Web Application : console log
DEBUG: org.springframework.security.web.FilterChainProxy - / at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
DEBUG: org.springframework.security.web.FilterChainProxy - / at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
DEBUG: org.springframework.security.web.context.HttpSessionSecurityContextRepository - No HttpSession currently exists
DEBUG: org.springframework.security.web.context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: null. A new one will be created.
DEBUG: org.springframework.security.web.FilterChainProxy - / at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'
DEBUG: org.springframework.security.web.FilterChainProxy - / at position 4 of 12 in additional filter chain; firing Filter: 'CsrfFilter'
DEBUG: org.springframework.security.web.FilterChainProxy - / at position 5 of 12 in additional filter chain; firing Filter: 'Logou
@junjun-dachi
junjun-dachi / RootConfig.java
Created July 6, 2017 14:34
Spring MVC Java Config : Part 2 Bean Validation and Exception Handler : RootConfig.java
package org.junjun.spring.tutorials.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import({ AppConfig.class })
public class RootConfig {
}
@junjun-dachi
junjun-dachi / portlet.xml
Last active June 29, 2017 07:03
Liferay 6 : Reject process action for ${url} on ${form}_WAR_${portlet} : portlet.xml
<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet>
<portlet-name>...</portlet-name>
<display-name>...</display-name>
@junjun-dachi
junjun-dachi / server.properties
Created June 27, 2017 02:17
SSL with Embedded Tomcat without Spring Boot : server.properties
# for embeded tomcat
tomcat.web.content.folder.path=${your.project}/src/main/webapp/
tomcat.web.base.folder.path=${your.project}/target/
tomcat.port=6060
tomcat.ssl.port=6443
@junjun-dachi
junjun-dachi / EmbeddedTomcat.java
Created June 27, 2017 02:12
SSL with Embedded Tomcat without Spring Boot : EmbeddedTomcat.java
package org.junjun.util.spring.server;
import java.util.Date;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.StandardContext;
@junjun-dachi
junjun-dachi / jboss-deployment-structure.xml
Created June 20, 2017 16:14
JBoss WildFly 8 : log4j not logging : jboss-deployment-structure.xml
<jboss-deployment-structure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<module-alias name="test">
<exclusions>
<module name="org.apache.log4j">
</module></exclusions>
</module-alias></deployment>
</jboss-deployment-structure>
@junjun-dachi
junjun-dachi / standalone.xml
Created June 20, 2017 16:13
JBoss WildFly 8 : log4j not logging : updated standalone.xml
<subsystem xmlns="urn:jboss:domain:logging:2.0">
<use-deployment-logging-config value="false">
<console-handler name="CONSOLE">
<level name="DEBUG">
<formatter>
<named-formatter name="COLOR-PATTERN">
</named-formatter></formatter>
</level></console-handler>
<periodic-rotating-file-handler autoflush="true" name="FILE">
<formatter>
@junjun-dachi
junjun-dachi / standalone.xml
Created June 20, 2017 16:11
JBoss WildFly 8 : log4j not logging : standalone.xml
<subsystem xmlns="urn:jboss:domain:logging:2.0">
<console-handler name="CONSOLE">
<level name="DEBUG">
<formatter>
<named-formatter name="COLOR-PATTERN">
</named-formatter></formatter>
</level></console-handler>
<periodic-rotating-file-handler autoflush="true" name="FILE">
<formatter>
<named-formatter name="PATTERN">