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 jdk.jvm; | |
import java.lang.management.ManagementFactory; | |
import java.util.List; | |
import org.apache.commons.lang.StringUtils; | |
/** | |
* 查询当前应用使用的JVM参数 | |
* |
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 demo.datax.entity; | |
import org.apache.commons.lang3.builder.ReflectionToStringBuilder; | |
import org.apache.commons.lang3.builder.ToStringStyle; | |
public class DemoEntity { | |
private String id; | |
private String name; | |
public String getId() { |
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
Haskell在数学问题上非常有表现力,有所有编程语言都羡慕不来的List comprehension, | |
比如:一个小学一年级的数学题:“大白 + 大白 = 白胖胖,求大、白、胖分别是哪3个数字”: | |
Haskell描述: | |
Prelude> [(大, 白, 胖)| 大 <- [1..9], 白 <- [1..9], 胖 <- [0..9], 大*10+白+大*10+白 == 白*100+胖*10+胖] | |
[(6,1,2)] | |
Prelude> 61+61 == 122 |
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
""""""""""""""""""""""""""""""""""""""" | |
" IdeaVim | |
""""""""""""""""""""""""""""""""""""""" | |
""""""""""""""""""""""""""""""""""""""" | |
"Gerneral | |
""""""""""""""""""""""""""""""""""""""" | |
" Set to auto read when a file is changed from the outside | |
set autoread |
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
function run_script() { | |
ssh -i ${SSH_CERT} -p 22 ${REMOTE_USER}@${REMOTE_HOST} "$@" | |
return $? | |
} | |
function upload_file() { | |
scp -i ${SSH_CERT} -P 22 "$1" ${REMOTE_USER}@${REMOTE_HOST}:"$2" | |
return $? | |
} |
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.daan.lis.api.module.api.controller.v2.report; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.aspectj.lang.annotation.Pointcut; | |
import org.aspectj.lang.reflect.MethodSignature; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; |
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
VirtualBox 的虚拟 XP 最初设定硬盘大小为 10 G,最近已经占到了 9 G 的使用率,急需扩容。网搜共找到两种方法, | |
一种是利用 GParted 拷贝硬盘的方法,比较麻烦,但是更为通用; | |
另一种是 VirtualBox 4.x 新加的一条命令,非常简单: | |
VBoxManage modifyhd winxp.vdi --resize 50000 | |
但是这样调整后,VirtualBox 已经可以识别出硬盘调整后的容量大小(50 G),而虚拟的 XP 系统 C 盘依然显示调整之前的容量。 | |
无碍,再去下载一个 Windows 分区软件 EASEUS Partition Master Home Edition V8.0.1,在里面会有调整 C 盘分区的操作, | |
该操作会把剩余没有识别出来的 40 G 的 unallocated 的空间合并到 C 盘里面。 |
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
# 起初想用 unoconv 将各类文档转成 pdf,txt 确实是一头包。这个方法基本可以将 txt 4 种格式都统一起来。 注意 linux 下需设置 | |
# | |
# LANG C.UTF-8 | |
# | |
package until | |
import ( | |
"unicode/utf16" | |
"bytes" |
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
My First 5 Minutes On A Server; Or, Essential Security for Linux Servers | |
https://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers | |
Securing a Linux Server | |
http://spenserj.com/blog/2013/07/15/securing-a-linux-server/ | |
如何保证Linux服务器的安全 | |
http://blog.jobbole.com/48195/ |
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
#1 source: mysqldump to data.sql.gz | |
#2 scp data.sql.gz to dest | |
#3 dest: echo data.sql.gz | mysql |
OlderNewer