Skip to content

Instantly share code, notes, and snippets.

View maicong's full-sized avatar
⚠️

ERR_INVALID_USER maicong

⚠️
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>时间如白驹过隙</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>时间如白驹过隙</title>
</head>
@maicong
maicong / kcptun
Last active October 23, 2017 10:54
/etc/init.d/kcptun
#!/bin/bash
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
@maicong
maicong / kcptun-config.json
Created October 23, 2017 10:54
kcptun config
{
"listen": "0.0.0.0:<kcptun_server_port>",
"target": "127.0.0.1:<ssserver_port>",
"key": "<kcptun_password>",
"crypt": "salsa20",
"mode": "fast2",
"mtu": 1350,
"sndwnd": 2048,
"rcvwnd": 2048,
"datashard": 70,
;(async (...without) => {
let list = []
for (const n of Array.from({ length: 10 }, (v, i) => 1 + i)) {
await window
.fetch(`http://haoma.qq.com/json/act${n}.json.js`)
.then(r => r.text())
.then(r => JSON.parse(r.slice(16, -1)))
.then(r => r[2].map(v => list.push(v.num)))
}
list = [...new Set(list.sort())]
<!DOCTYPE html>
<html>
<body>
<div id="player" class="aplayer"></div>
<script src="https://cdn.bootcss.com/aplayer/1.6.0/APlayer.min.js"></script>
<script>
(() => {
const music = [
{
title: '以前你给过的快乐 现在都陪着我难过',
{
"area": {
"华北": {
"110000": "北京市",
"120000": "天津市",
"130000": "河北省",
"140000": "山西省",
"150000": "内蒙古自治区"
},
"华中": {
/**
* 安装
* yarn add babel-cli babel-preset-env axios qs
*
* 配置 .babelrc
* {
* "presets": ["env"]
* }
*
* 运行
/**
* 使用百度语音合成自动文本转语音
*
* 进入 http://ai.baidu.com/tech/speech/tts ,打开 console,粘贴本代码
*/
// 生成文本列表:通过直接定义
const text = '当不幸降临在他人头上时,他们往往都能像智者一样劝慰别人;而当同样的不幸降临自己身上时,人往往很难同样地开导自己。人最大的不智不是不知道,而是知道了却迟迟不愿去做,所以平庸却又自怜的人很多。'
const textArr = text
@maicong
maicong / .vimrc
Last active April 21, 2017 07:12
filetype on
syntax on
set number
set history=1000
set background=dark
set wrapscan
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4