Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing on work

見える biezhi

🎯
Focusing on work
View GitHub Profile
@biezhi
biezhi / ASCII.java
Created Sep 6, 2016 — forked from shmert/ASCII.java
Convert images to ASCII text
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
View Spring Schema扩展.md

介绍

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

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

  • 编写自定义类
  • 编写xml schema来描述自定义元素
  • 编写NamespaceHandler新样式.css的实现类
  • 编写BeanDefinitionParser实现类
  • 把以上组建注册到Spring
@biezhi
biezhi / text3d.css
Created Feb 26, 2017 — forked from catouse/text3d.css
CSS3文字效果
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),
@biezhi
biezhi / sqlite转换换行符.md
Created Mar 3, 2017
sqlite转换换行符.md
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');
@biezhi
biezhi / docker_cmd.md
Last active Nov 18, 2020
docker常用命令
View docker_cmd.md

根据DockerFile构建容器

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

查看所有容器

@biezhi
biezhi / ss安装.md
Created Apr 2, 2017
vps安装shadowsocks
View ss安装.md

安装python和ss

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

配置 Shadowsocks 配置文件

@biezhi
biezhi / MethodParamNamesScaner.java
Created Apr 21, 2017 — forked from wendal/MethodParamNamesScaner.java
获得方法形参名称列表(Java)
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;
@biezhi
biezhi / RequsetParser.java
Created May 11, 2017 — forked from wanghongfei/RequsetParser.java
Netty HTTP请求参数解析器, 支持GET和POST
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 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 maven_cmd.md

重置maven所有模块的版本号

mvn versions:set -DnewVersion=1.0.1-SNAPSHOT