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
{ | |
"1,1,1,8": [ | |
"(1+1+1)×8" | |
], | |
"1,1,1,11": [ | |
"(11+1)×(1+1)" | |
], | |
"1,1,1,12": [ | |
"(1+1)×12×1" | |
], |
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
<body> | |
<script> | |
// record every requestAnimationFrame interval and use them to calculate the average framerate. | |
let frameRate = 0; | |
let historyInterval = []; | |
let historyIntervalLength = 200; | |
let lastTime = Date.now(); | |
requestAnimationFrame(function loop() { |
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
import { _decorator, Component } from 'cc' | |
const { ccclass, property } = _decorator; | |
/** 浅对比是否相同 */ | |
function isShallowEqual(value: Record<string, any>, other: Record<string, any>) { | |
if (value === other) { | |
return true | |
} | |
if (!value || !other) { | |
return false |
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
https://developers.cloudflare.com/analytics/graphql-api/ | |
{ | |
viewer { | |
zones(filter: {zoneTag: $tag}) { | |
httpRequests1dGroups(limit: 7, orderBy: [date_DESC], filter: {date_in: ["2022-11-19", "2022-11-18"]}) { | |
dimensions { | |
date | |
} | |
sum { |
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
# 新建一个这个文件,给 chmod +x 权限,放到此位置:/jffs/.koolshare/ss/postscripts/P01iptables.sh | |
#!/bin/sh | |
# shadowsocks script for HND/AXHND router with kernel 4.1.27/4.1.51 merlin firmware | |
# 此脚本是一个示例,实际写法按照自己的方法来做 | |
# 更改此脚本的名字,保证此脚本的名字格式是: P+数字+名字.sh | |
# 例如在/koolshare/ss/postscripts下放入两个脚本:P01V2xxx.sh, P99Brook.sh | |
# SS插件运行后货自动按照数字从小到大顺序运行 P01xxx.sh start, P99Brook.sh start |
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
// in chrome console | |
[...getComputedStyle(document.body)] |
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
package main | |
import "fmt" | |
func main() { | |
a := []int{1, 2, 3} | |
b := a[0:2] | |
fmt.Println(cap(a), cap(b)) |
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
/* | |
js logic x 8,931,284 ops/sec ±0.48% (90 runs sampled) | |
re x 9,434,634 ops/sec ±0.66% (92 runs sampled) | |
Fastest is re | |
*/ | |
const Benchmark = require('benchmark') | |
var suite = new Benchmark.Suite; | |
const str = 'aldfkjlakdsjflajkdsflakjdfjzakljerowiuetoywoihgkhgkzjcvlzcnvkjsdfbalhdfl' | |
const start = 65; |
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
const os = require('os') | |
function getLanAddress() { | |
const ifaces = os.networkInterfaces(); | |
if (ifaces) { | |
for (const dev of Object.keys(ifaces)) { | |
for (const details of ifaces[dev]) { | |
if (details.family === 'IPv4' && details.mac !== '00:00:00:00:00:00') { | |
return details.address; | |
} |
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
// 在微博个人主页运行 | |
// 途中需要手动删除不能被设置的微博,大概5分钟出现一次。原因不明。 | |
// 此脚本最好运行3遍或以上。 | |
window.ff = $; | |
window.addPage = function () { | |
window.ff('.page.next.S_txt1.S_line1').click() | |
}; | |
setInterval(function () { | |
var oriy = window.scrollTop; | |
console.log(`orix`, oriy); |
NewerOlder