Skip to content

Instantly share code, notes, and snippets.

View libook's full-sized avatar
🎵
Never Gonna Give You Up~

Daniel Li libook

🎵
Never Gonna Give You Up~
View GitHub Profile
@libook
libook / browser_log.json
Last active July 31, 2023 04:23
Jellyfin URL
Uncaught (in promise)
Response { type: "basic", url: "http://192.168.50.48:8096/Users/beeb2f336b514896aa21ce0ae077d29c/Items?Ids=5ce8cf6510202559fef9420d81d3e357%2C9b4db04797fdd7d7955ed5312e469cd4%2Cd9b000184b29d969567a36d44c9a8bc7%2Cdfc6f9ac7e25adde9ea5095e80a9d7a7%2C0fc0b3828c9d0404280b8245c201df9e%2Ce03b10569f97a58b250f9cf24a64d7ea%2C32f951fa5333e00c7d41856dba254a2d%2C5a4b7b3b70b4b683ab70f226801c5c2b%2C87aaa5ef1d73d9f0b8697601cbf35dce%2C34e45509fe7dada5474f009398e68a1d%2C81aab424919ef267b193d9b1022cde85%2C143685a94c99aa55ad561461abfb7e3c%2Ce08d658c43b9693be67e23b89e45680b%2Ce5c97a84d7684b748ca652ad4c404012%2C4e7b227bbab07af57b747f38cab52fea%2C1d6f69c47bb95a469fe1692c8000db9f%2Ccd71cfeaf2bb722ad9c286cb74a3aa68%2C838084a579daba32355f170d894a26fb%2C9e7774b9c9e40408b31a0064a0d2ab86%2Cdca674834a94cda7f90ba0fcebb364e9%2C69abc5dedca72813186706310cee12a6%2C96248482fc6b6e7e8a5935aa5c3293bd%2C2e49911ad7b2c67f2aa2e5e3d54f2cc9%2C82017d2d6bda060d266b23d3f4c4bfdb%2C73095548540dd6d58fb80df6af301ff8%2Cf293caf8dcd80eb14b5
@libook
libook / Minecraft.json
Created June 28, 2023 09:46
Minecraft Prometheus Grafana Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@libook
libook / snapraid-dup-awk.sh
Last active April 17, 2023 04:16
snapraid dup before '='
awk -F'= ' '{sub(/^[[:space:]]*[0-9]+\s*/, "", $1); gsub(/[[:space:]]*$/, "", $1); print $1}'
861 20:25:12.789631 read(4, <unfinished ...>
860 20:25:12.789778 read(4, <unfinished ...>
859 20:25:12.789818 read(4, <unfinished ...>
858 20:25:12.789854 read(4, <unfinished ...>
857 20:25:12.789890 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
856 20:25:12.789927 futex(0x7fff059d2088, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
861 20:25:12.945668 <... read resumed>"P\0\0\0\17\0\0\0b\326\f\1\0\0\0\0@\320\0\0\0\0\0\0\350\3\0\0d\0\0\0\355\4\0\0\0\0\0\0\220\216>\260\250\177\0\0\0\300\351\233\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\2\200\0\0\0\0\0\0", 1052672) = 80 <0.155911>
861 20:25:12.945976 pread64(7, <unfinished ...>
860 20:25:12.946034 <... read resumed>"P\0\0\0\17\0\0\0d\326\f\1\0\0\0\0@\320\0\0\0\0\0\0\350\3\0\0d\0\0\0\355\4\0\0\0\0\0\0\220\216>\260\250\177\0\0\0\300\353\233\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\2\200\0\0\0\0\0\0", 1052672) = 80 <0.156221>
860 20:25:12.946213 pread64(7, <unfinished .
@libook
libook / bump-version.sh
Created December 10, 2020 06:36 — forked from Nomane/bump-version.sh
Bump version shell script.
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# Original version modified by Marek Suscak
#
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"
someElement.dispatchEvent(new MouseEvent('mouseover', {bubbles: true}));
@libook
libook / Get all dns records of a domain from DNSPod.console.js
Last active December 9, 2019 03:01
Get all dns records of a domain from DNSPod.
/*
<tbody>
<tr class="">
<td class="">
<div><label class="tea-form-check tea-form-check--table-select" name="523324"><input readonly=""
type="checkbox" class="tea-checkbox"><span class="tea-form-check__label">&nbsp;</span></label>
</div>
</td>
<td class="">
<div>
@libook
libook / Promise.any.js
Created August 14, 2019 08:51
Polyfill of Promise.any
/**
* Polyfill of Promise.any
* @param {Promise[]} promiseList
* @returns {Promise<Object>} - First fulfilled result form one of promiseList.
* @throws {Error} - Provide mixed error message and errors property.
*/
const promiseAny = async (promiseList) => {
return Promise.all(promiseList.map(promise => {
return promise.then(
value => {
package main
import (
"fmt"
)
func Iteration(x, r float64) float64 {
//f(x)=x^2-r
//随机取的x,算出对应的y
y := x*x - r
@libook
libook / kcptun-client.dockerfile
Created March 13, 2019 16:37
shadowsocks-go kcptun dockerfiles
# docker build -t kcptun-client -f ./kcptun-client.dockerfile .
FROM golang:alpine
MAINTAINER libook
RUN apk --no-cache add git \
&& go get -u github.com/xtaci/kcptun/... \
&& ls $GOPATH/bin \
&& mv $GOPATH/bin/client / \
&& rm -rf $GOPATH \