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
# 生成 dhparam.pem 文件, 在命令行执行任一方法: | |
# 方法1: 很慢 | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
# 方法2: 较快 | |
# 与方法1无明显区别. 2048位也足够用, 4096更强 | |
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096 |
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
/** | |
* 定期回收心跳的数据 | |
*/ | |
public class PoolItemService { | |
final static HashedWheelTimer TIMER = new HashedWheelTimer(KKThreadFactory.getInstance("MOTimer", 1)); | |
private ManageClientServiceService manageClientService; | |
public PoolItemService(ManageClientServiceService iTimerToHeat) { |
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
@Slf4j | |
public abstract class AbsTimerItem { | |
private static final long MIN_TIMEOUT_MILLIS = 1L; | |
private HashedWheelTimer timer; | |
private long readerIdleTimeMillis; | |
private long writerIdleTimeMillis; |
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
/** | |
* Created by JackSun on 2017/5/25. | |
* | |
* Connect Me. admin@jacksun.me | |
*/ | |
public class KKThreadHelp { | |
// 计算类型 |
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
public class Singleton { | |
private static final AtomicReference<Singleton> INSTANCE = new AtomicReference<Singleton>(); | |
private Singleton() {} | |
public static Singleton getInstance() { | |
for (;;) { | |
Singleton singleton = INSTANCE.get(); | |
if (null != singleton) { | |
return singleton; |
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
城的灯 | |
http://www.yangguo.info/ |
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
<?php | |
class Token | |
{ | |
private $mmc; | |
private $cache_time; | |
function __construct() | |
{ | |
$this->cache_time = 60 * 60 * 24; |
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/bash | |
# | |
# 通过对比 ping 响应时间,找到本机最快的上传ip | |
# Travis@fir.im | |
# | |
function refresh_host() | |
{ | |
IP="$1" | |
UPLOAD_HOST="upload.qiniu.com" |
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
### This file configures various client-side behaviors. | |
### | |
### The commented-out examples below are intended to demonstrate | |
### how to use this file. | |
### Section for authentication and authorization customizations. | |
[auth] | |
### Set password stores used by Subversion. They should be | |
### delimited by spaces or commas. The order of values determines | |
### the order in which password stores are used. |
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 —— 从入门到实践](http://yeasy.gitbooks.io/docker_practice/) | |
[OpenWrt智能、自动、透明翻墙路由器教程](http://softwaredownload.gitbooks.io/openwrt-fanqiang/) | |
[Django Girls Tutorial](http://djangogirls.gitbooks.io/djangogirls-tutorial/) | |
[零基础学Python](http://looly.gitbooks.io/python-basic/) | |
[github-cheat-sheet](http://snowdream86.gitbooks.io/github-cheat-sheet/) |
NewerOlder