Skip to content

Instantly share code, notes, and snippets.

View fakeboboliu's full-sized avatar
🍄
I'm a mushroom

bobo liu fakeboboliu

🍄
I'm a mushroom
View GitHub Profile
@fakeboboliu
fakeboboliu / README.md
Last active January 16, 2025 18:27
雅黑探针 FreeBSD 修复版 -- 作于注册 Serv00 后

在 Serv00 使用需要下面的抑制安全设定,以 DevilWEB 为例:

打开 WWW Websites,在要使用的站点右边的 Manage - Details 里面做如下设置:

  1. 打开 Allow PHP exec() function
  2. Open Basedir directories 最后面 追加 :/sbin:/usr/bin

保存即可。

针对 Serv00 的脑瘫在线编辑器问题做出了妥协,目前版本可以正常在在线编辑器中粘贴使用。

650087cfaa0e75236d3e60bb
@fakeboboliu
fakeboboliu / x86-64-level.sh
Last active May 2, 2022 08:25
Which X86-64 Microarchitecture level should I use?
#!/bin/sh
if [ `lscpu|grep x86_64|wc -l` -ge 1 ]; then # v1 / baseline
if [ `lscpu|grep sse3|grep sse4_1|grep sse4_2|grep ssse3|grep popcnt|grep lahf|grep cx16|wc -l` -ge 1 ]; then # v2
if [ `lscpu|grep avx|grep avx2|grep bmi1|grep bmi2|grep f16c|grep fma|grep abm|grep movbe|grep xsave|wc -l` -ge 1 ]; then # v3
if [ `lscpu|grep avx512f|grep avx512bw|grep avx512cd|grep avx512dq|grep avx512vl|wc -l` -ge 1 ]; then # v4
echo "v4"
else echo "v3"; fi
else echo "v2"; fi
else echo "v1"; fi
@fakeboboliu
fakeboboliu / ehv2eze.py
Last active March 16, 2022 15:18
ehv metadata fetcher for LANraragi (w/ eze plugin)
# coding: u8
import requests
import os
import json
import logging
import time
import random
OVERWRITE = False # Overwrite existing info.json, enable only if you know what you are doing.

Keybase proof

I hereby claim:

  • I am fakeboboliu on github.
  • I am boboliu (https://keybase.io/boboliu) on keybase.
  • I have a public key ASA6RAiwbA4Xj6B6MM3knC8rf8a4hiRY1MrARkgTozddPgo

To claim this, I am signing this object:

Nothing could be pinned
@fakeboboliu
fakeboboliu / duration.py
Created July 29, 2020 16:15
time duration parse (mm:ss.ss)
regex = re.compile(r'((?P<minutes>\d+?):)((?P<seconds>\d+?)\.)((?P<milliseconds>\d+))')
def parse_time(time_str):
parts = regex.match(time_str)
if not parts:
return
parts = parts.groupdict()
time_params = {}
for (name, param) in parts.items():
if param:
@fakeboboliu
fakeboboliu / timeit.go
Created April 22, 2020 13:45
Measure running time on old school windows
package main
import (
"os/exec"
"os"
"fmt"
"time"
)
func main() {
@fakeboboliu
fakeboboliu / README.md
Last active August 25, 2019 06:43
clash-collectd

将 clash 日志接口与 collectd 的 curl 相结合的 wrapper

Build:

go build -ldflags="-s -w" -o clash-collectd.elf
@fakeboboliu
fakeboboliu / chh.user.js
Last active June 13, 2018 01:18
chh auto refresh
// ==UserScript==
// @name chh后台刷新
// @namespace https://gist.github.com/popu125/c3fb0f5ee2272b78aa36b999fc72994c
// @version 0.3
// @description 把chh丢在后台,自动刷新签到
// @author bobo liu
// @include https://www.chiphell.com/portal.php?r
// @grant none
// ==/UserScript==