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/sbin/ntpdate ntp.91.com; /sbin/hwclock --systohc | |
echo "#time update add by netdragon" >> /etc/crontab | |
echo "0 * * * * root (/usr/sbin/ntpdate ntp.91.com; /sbin/hwclock --systohc)" >> /etc/crontab | |
echo "01 3 * * * root /usr/bin/yum -y update >/dev/null 2>&1" >> /etc/crontab |
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
// | |
// FWCache.m | |
// CacheMeIfYouCan | |
// | |
// Created by fanwu on 15/8/7. | |
// Copyright (c) 2015年 ND. All rights reserved. | |
// | |
#import "FWCache.h" | |
#import "NSString+MD5.h" |
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
// | |
// BinaryDataScanner.m | |
// | |
// Copyright 2009 Dave Peck <davepeck [at] davepeck [dot] org>. All rights reserved. | |
// http://davepeck.org/ | |
// | |
// This class makes it quite a bit easier to read sequential binary files in Objective-C. | |
// | |
// This code is released under the BSD license. If you use it in your product, please | |
// let me know and, if possible, please put me in your credits. |
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
// | |
// BinaryDataScanner.m | |
// | |
// Copyright 2009 Dave Peck <davepeck [at] davepeck [dot] org>. All rights reserved. | |
// http://davepeck.org/ | |
// | |
// This class makes it quite a bit easier to read sequential binary files in Objective-C. | |
// | |
// This code is released under the BSD license. If you use it in your product, please | |
// let me know and, if possible, please put me in your credits. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
CREATE DATABASE `final` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; | |
DROP DATABASE final; | |
CREATE USER 'fanwu'@'%' IDENTIFIED BY '123456'; | |
GRANT ALL PRIVILEGES ON final.* TO 'fanwu'; | |
FLUSH PRIVILEGES ; |
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
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
return application.sources(Application.class); | |
} |
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
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
<target>System.out</target> | |
<encoder> | |
<pattern>%date{ISO8601} %highlight([%thread] %-5level) %cyan(%logger{32}) - %msg%n</pattern> | |
</encoder> | |
</appender> |
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 FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> { | |
private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); | |
private Class<T> clazz; | |
public FastJson2JsonRedisSerializer(Class<T> clazz) { | |
super(); | |
this.clazz = clazz; | |
} | |
@Override |
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 | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
OlderNewer