Instantly share code, notes, and snippets.

View autoReply.js
/**
* 自动回复,粘贴在控制台
*
* 开始: startLoop()
* 停止: stopLoop()
*/
(() => {
let text = '', lastText = '', msg = '', timer = null, count = 0
let faces = [
View 一键评论.js
javascript:(() => {
const $ = ele => document.querySelector(ele) || null;
const $author = $('input[name="author"]');
const $mail = $('input[name="mail"]') || $('input[name="email"]');
const $url = $('input[name="url"]');
const $comment = $('textarea[name="w"]') || $('textarea[name="text"]') || $('textarea[name="comment"]');
const randomValue = [
'写的不错,很有深度,令人信服。',
'又在折腾了啊,我都没了折腾的精力。',
'感同身受。',
View page-lab.php
<?php
/**
*
* 实验室
*
* @package custom
* @author MaiCong <i@maicong.me>
* @link https://github.com/maicong/stay
* @since 1.0.0
*/
View page-lab.css
.main .page-lab .post__content .lab {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
padding: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-flow: row wrap;
-ms-flex-flow: row wrap;
View timeout2.html
<!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>
View timeout1.html
<!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>
View kcptun-config.json
{
"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,
View 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
View qq.js
;(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())]
View lizhi.html
<!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: '以前你给过的快乐 现在都陪着我难过',