Skip to content

Instantly share code, notes, and snippets.

View sendya's full-sized avatar
🎯
Focusing

言肆 sendya

🎯
Focusing
View GitHub Profile
@sendya
sendya / gist:3ec2dbc1f8b80a8d740914824fff6ffb
Created August 25, 2016 01:53 — forked from moneytoo/gist:ab3f34e4fddc2110675952f8280f49c5
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 7
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel
OPENSSL="openssl-1.0.2h"
NGINX="nginx-1.11.3-1"
mkdir -p /opt/lib
wget https://www.openssl.org/source/$OPENSSL.tar.gz -O /opt/lib/$OPENSSL.tar.gz
tar -zxvf /opt/lib/$OPENSSL.tar.gz -C /opt/lib
@sendya
sendya / cnmp.sh
Last active November 20, 2016 07:56 — forked from kookxiang/cnmp.sh
CNMP (Centos 7 + Nginx + MariaDB + PHP7) Install Script
#!env bash
installCNMP(){
if [[ -e /etc/redhat-release ]]; then
RELEASE_RPM=$(rpm -qf /etc/centos-release)
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM})
if [ ${RELEASE} != "7" ]; then
echo "Not CentOS release 7."
exit 1
fi
else

Keybase proof

I hereby claim:

  • I am sendya on github.
  • I am sendya (https://keybase.io/sendya) on keybase.
  • I have a public key whose fingerprint is 4404 8321 927B 6EFE 34A9 818B 14B3 F759 73B6 FA9F

To claim this, I am signing this object:

@sendya
sendya / get_appid.js
Last active June 2, 2017 07:44
steaminfo: Get current user appid
/**
* 获取 https://steamdb.info/calculator/ 你的steamid /
* 你所拥有的游戏 appid
*/
var appids = '';
$("#table-apps tbody .app").each(function() {
appids += $(this).data("appid") + ',';
});
console.log(appids);
#!/bin/bash
clear
echo Welcome to server `hostname -s`!
echo
echo "System:" `cat /etc/arch-release`
echo "Kernel:" `uname -r`
echo "Uptime:" `uptime -p`
echo " Load:" `cat /proc/loadavg | awk '{print $1"\t"$2"\t"$3;}'`
echo
echo "Disk usage: root:" `df -Ph | grep /dev/xvda1 | awk '{print $3" / "$2"\t("$5")"}'`
@sendya
sendya / logback.xml
Created June 14, 2017 12:11
java log4j config xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="true">
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<property name="CONSOLE_LOG_PATTERN" value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:
var fs = require("fs");
// 动态路由
var loadRoute = {
path : './routes/',
app : null,
// 遍历目录
listDir : function(dir){
var fileList = fs.readdirSync(dir,'utf-8');
for(var i=0;i<fileList.length;i++) {
var stat = fs.lstatSync(dir + fileList[i]);
package io.tooko.talk.web.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.*;
package io.tooko.talk.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.io.*;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
public class Main {
private static int length = 0x2FFFFFFF;//1G
private abstract static class Tester {