Skip to content

Instantly share code, notes, and snippets.

View lzhoucs's full-sized avatar
🏠
Working from home

Liang Zhou lzhoucs

🏠
Working from home
View GitHub Profile
@lzhoucs
lzhoucs / css3box-template.html
Last active December 16, 2015 02:09
A simple css3 box effect for div.
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<style type="text/css">
div {
width : 400px;
@lzhoucs
lzhoucs / 00.web dev templates
Last active December 16, 2015 08:29
templates to for web development.
title file
@lzhoucs
lzhoucs / persistence.xml
Created April 21, 2013 19:13
JPA 2 persistence.xml example with hibernate and h2
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="punit1">
<jta-data-source>java:/DefaultDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
@lzhoucs
lzhoucs / codeStyle.html
Last active December 21, 2015 13:09
A very simple css to style code within <pre>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Code style</title>
<style>
pre {
padding: 5px;
border-style: solid;
border-width: 1px;
@lzhoucs
lzhoucs / 00.Singleton Pattern in Spring
Last active December 23, 2015 02:49
A singleton pattern from Spring in Action 3rd
title file
@lzhoucs
lzhoucs / 00.jersey helloword1
Last active January 14, 2017 08:25
jax-rs with jersey 2.3 + tomcat 7
title file.
@lzhoucs
lzhoucs / .gitignore
Created October 31, 2013 09:35
git ignore file
# intellij project files #
##########################
.idea/
*.iml
# eclipse project files #
#########################
.classpath
.project
.settings/
@lzhoucs
lzhoucs / intellij-shortcut.txt
Created November 2, 2013 06:05
Intellij IDEA 12 useful shortcuts
Intellij IDEA 12 useful shortcuts
Find action by name : Shift + Ctrl + A
Structural selection: Ctrl + W / Shift + Ctrl + W
Select in: Alt + F1
Navigate to implementations via Ctrl + Alt + B
Navigate to the last edit location via Shift + Ctrl + Backspace
Navigate to a related unit test via Shift + Ctrl + T
Reformat Code: Alt + Ctrl + L
Auto-indent lines " Alt + Ctrl + I
@lzhoucs
lzhoucs / ppa.txt
Last active June 25, 2016 22:59
My ppa list
ppa:webupd8team/java oracle-java-8 oracle-java-7 oracle-java7-set-default
ppa:git-core/ppa
ppa:brightbox/ruby-ng
ppa:chris-lea/node.js
@lzhoucs
lzhoucs / vim-build.log
Last active December 30, 2015 15:59
build vim form source
0. install dependency first
sudo apt-get install python-dev libncurses5-dev
1.
lzhoucs@LZCS-G580-Luna:~/Dev/Repos/Hg/vim$ ./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config --enable-perlinterp --enable-cscope --prefix /usr
2. install checkinstall
lzhoucs@LZCS-G580-Luna:~/Dev/Repos/Hg/vim$ sudo apt-get install checkinstall
3. build