Skip to content

Instantly share code, notes, and snippets.

View n0099's full-sized avatar
🏳️‍⚧️
GAHT 24-11-01

n0099 n0099

🏳️‍⚧️
GAHT 24-11-01
View GitHub Profile
@n0099
n0099 / request.sh
Last active July 7, 2026 04:30
www. domain of all known registrable second-level ccTLD (assume all TLD with two chars are ISO 3166-1 alpha-2, i.e. ccTLD) from https://github.com/publicsuffix/list, e.g. https://www.or.jp https://learn.microsoft.com/ja-jp/answers/questions/2406450/bing
#!/usr/bin/env bash
domain=www."$1"
request() {
curl -ksLw '%{stderr}%{url_effective},%{http_version},%{response_code},%{time_total},%{errormsg}' -m 60 http://"$domain" |
grep -oiP '(?<=<title>)(.|\n)+?(?=</title>)' |
head -n1 | # not using grep -m1 as it will close its stdin, i.e. the stdout of curl
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' # https://stackoverflow.com/questions/369758/how-to-trim-whitespace-from-a-bash-variable/3232433#3232433
return "${PIPESTATUS[0]}" # https://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another
}
{
// run in F12-Console under https://steamcommunity.com/id/${yourUsername}/home/
// more about friend activity: https://steamcommunity.com/sharedfiles/filedetails/?id=835308111
let steamID64 = '0'; // https://developer.valvesoftware.com/wiki/SteamID MUST BE WARPPED IN 'STRING' TO PREVENT IEEE754 related issues https://en.wikipedia.org/wiki/Nominal_number
const removeElements = () => {
jQuery(`div.blotter_block a:not([href="https://steamcommunity.com/profiles/${steamID64}"])`)
.parents('div.blotter_block')
// parent elements that contain any <a href=""> not linking to user profile
// are also including ones that contain the link to the user profile
// so we need to exclude them
.not(jQuery(`div.blotter_block a[href="https://steamcommunity.com/profiles/${steamID64}"]`)
using System.Text.Encodings.Web;
using static System.Text.Json.JsonSerializer;
namespace tbm.Crawler;
public class MigrationWorker : BackgroundService
{
private readonly ILogger<MigrationWorker> _logger;
private readonly ILifetimeScope _scope0;
using System.Text.Encodings.Web;
using System.Text.RegularExpressions;
namespace tbm.Crawler
{
public class MigrateWorker : BackgroundService
{
private readonly ILogger<MigrateWorker> _logger;
private readonly ILifetimeScope _scope;
using System.Text.Encodings.Web;
using TbClient.Post.Common;
using static System.Text.Json.JsonSerializer;
namespace tbm.Crawler
{
public class MigrationWorker : BackgroundService
{
private readonly ILogger<MigrationWorker> _logger;
private readonly ILifetimeScope _scope0;
@n0099
n0099 / Convert.cs
Last active July 28, 2022 21:14
tbm migration
using System.Buffers;
using System.Text.Encodings.Web;
using System.Text.Json.Nodes;
using System.Text.RegularExpressions;
namespace tbm.Crawler
{
public class ConvertPostContentToProtoBufWorker : BackgroundService
{
private readonly ILogger<ConvertPostContentToProtoBufWorker> _logger;

四叶mc服112至118迁移插件列表

name usage mcver rm? tips
AdvancedAchievements 更多成就 1.17 [x] 付费插件,2021-11停更
AnimatedFrames 展示框图片 1.17
ArmorStandTools 自定义盔甲架 1.18
ASkyBlock 空岛 1.12 [x] 2018-08停更,后继者BentoBox
AuthMe 登录 1.16
BarAPI SimpleBossBar的依赖 1.12 [x]