#查询当前目录下的子目录占用空间大小 du -h --max-depth=1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shishu.service; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics2D; | |
import java.awt.Image; | |
import java.awt.RenderingHints; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FileOutputStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
/** | |
* 根据经纬度计算距离 | |
* @author Johnnian | |
* | |
*/ | |
public class LocationUtils { | |
private static double EARTH_RADIUS = 6378.137; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#description: release memory | |
free -m|awk '/^Mem/ {if($4<512) {system("sync&&echo 3 > /proc/sys/vm/drop_caches");}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hAdmin: [https://github.com/huangyaoxin/hAdmin](https://github.com/huangyaoxin/hAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
打开终端,执行 /usr/libexec/java_home -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa | |
ssh-copy-id -i /root/.ssh/id_rsa.pub root@x.x.x.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 命令行工具 | |
H2数据库提供了一组命令行工具,如果你需要了解这些工具,使用参数`-?`,如: | |
java -cp h2*.jar org.h2.tools.Backup -? | |
命令行工具有: | |
* Backup 创建数据库备份 | |
* ChangeFileEncryption 允许改变文件加密密码和数据库的加密算法 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
NewerOlder