View ImageUtils.java
import javax.imageio.IIOImage;
import javax.imageio.ImageIO;
import javax.imageio.ImageWriteParam;
import javax.imageio.ImageWriter;
import javax.imageio.stream.ImageOutputStream;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
View QRterminal.java
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import java.util.Hashtable;
View Debuggable.java
public interface Debuggable {
default String debug() {
StringBuilder sb = new StringBuilder(this.getClass().getName());
sb.append(" [ ");
Field[] fields = this.getClass().getDeclaredFields();
for (Field f : fields) {
f.setAccessible(true);
try {
sb.append(f.getName() + " = " + f.get(this));
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');