Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.BeansException;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
@johnnian
johnnian / clear_h2.sql
Last active August 31, 2017 01:41
Quartz H2数据库清空脚本
delete from QRTZ_TRIGGERS where 1=1;
delete from QRTZ_SIMPLE_TRIGGERS where 1=1;
delete from QRTZ_SIMPROP_TRIGGERS where 1=1;
delete from QRTZ_BLOB_TRIGGERS where 1=1;
delete from QRTZ_CRON_TRIGGERS where 1=1;
delete from QRTZ_FIRED_TRIGGERS where 1=1;
delete from QRTZ_SCHEDULER_STATE where 1=1;
delete from QRTZ_CALENDARS where 1=1;
delete from QRTZ_LOCKS where 1=1;
delete from QRTZ_PAUSED_TRIGGER_GRPS where 1=1;
#MacOS
kill -9 $(ps -ef|grep redis |awk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')
#Linux
ps aux | grep "redis" | grep -v grep | cut -c 9-15 | xargs kill -9
@johnnian
johnnian / RemoveJDK
Last active August 10, 2017 02:04
JDK Remove #Shell
[root@localhost ~]$ rpm -qa|grep jdk
jdk-1.6.0_45-fcs.x86_64
java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
[root@localhost ~]$ yum -y remove jdk-1.6.0_45-fcs.x86_64
[root@localhost ~]$ yum -y remove java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
[root@localhost ~]$ yum -y remove java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
rpm -e --nodeps jdk-1.6.0_45-fcs.x86_64
@johnnian
johnnian / H2Command
Last active December 20, 2022 05:16
H2命令行
## 命令行工具
H2数据库提供了一组命令行工具,如果你需要了解这些工具,使用参数`-?`,如:
java -cp h2*.jar org.h2.tools.Backup -?
命令行工具有:
* Backup 创建数据库备份
* ChangeFileEncryption 允许改变文件加密密码和数据库的加密算法
@johnnian
johnnian / zshrc-docker config
Last active August 10, 2017 02:03
zsh #Shell
# Docker command
alias dec="docker exec -it "
alias dim="docker images"
alias dps="docker ps -l"
alias dpsa="docker ps -a"
alias dstart="docker start "
alias dstop="docker stop "
alias dkill="docker kill "
alias drm="docker rm "
alias drmi="docker rmi "
@johnnian
johnnian / SSH Config
Last active August 10, 2017 02:03
SSH #Shell
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id_rsa.pub root@x.x.x.x
@johnnian
johnnian / shell.md
Created September 6, 2017 05:48
Linux常用命令

#查询当前目录下的子目录占用空间大小 du -h --max-depth=1

@johnnian
johnnian / MacOS JDK安装路径
Created September 28, 2017 01:52
MacOS JDK安装路径
打开终端,执行 /usr/libexec/java_home -V
@johnnian
johnnian / readme
Created September 28, 2017 09:21
Bootstrap后台模板框架
- hAdmin: [https://github.com/huangyaoxin/hAdmin](https://github.com/huangyaoxin/hAdmin)