View maven_cmd.md

重置maven所有模块的版本号

mvn versions:set -DnewVersion=1.0.1-SNAPSHOT
View gist:a15eaf9866bc6b22a303e65eba61b5e9
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
View RequsetParser.java
package cn.fh.http.component;
import cn.fh.http.exception.BaseCheckedException;
import cn.fh.http.exception.MethodNotSupportedException;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.QueryStringDecoder;
import io.netty.handler.codec.http.multipart.Attribute;
import io.netty.handler.codec.http.multipart.HttpPostRequestDecoder;
import io.netty.handler.codec.http.multipart.InterfaceHttpData;
View MethodParamNamesScaner.java
package org.nutz.lang.util;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
View ss安装.md

安装python和ss

yum install python-setuptools && easy_install pip
pip install shadowsocks

配置 Shadowsocks 配置文件

View docker_cmd.md

根据DockerFile构建容器

cd DockerFile所在目录
docker build -t 镜像名 .

查看所有容器

View sqlite转换换行符.md
UPDATE t_contents SET content=REPLACE(content,'\r\n', X'0D'||X'0A');
UPDATE t_comments SET content=REPLACE(content,'\r\n', X'0D'||X'0A');
UPDATE t_options SET value=REPLACE(value,'\r\n', X'0D'||X'0A');
View text3d.css
h1 {
text-shadow: 0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 3px 0 #bbb,
0 4px 0 #b9b9b9,
0 5px 0 #aaa,
0 6px 1px rgba(0,0,0,.1),
0 0 5px rgba(0,0,0,.1),
0 1px 3px rgba(0,0,0,.3),
0 3px 5px rgba(0,0,0,.2),
View Spring Schema扩展.md

介绍

Spring从2.0开始引入了一个新的机制用于扩展xml模式,我们就可以编写自定义的xml bean解析器然后集成到Spring IoC容器中。

xml扩展大概有以下几个步骤:

  • 编写自定义类
  • 编写xml schema来描述自定义元素
  • 编写NamespaceHandler新样式.css的实现类
  • 编写BeanDefinitionParser实现类
  • 把以上组建注册到Spring
View ASCII.java
package ascii;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
/*Copyright (c) 2011 Aravind Rao