Skip to content

Instantly share code, notes, and snippets.

View spacemeowx2's full-sized avatar

imspace spacemeowx2

  • 13:16 (UTC +08:00)
View GitHub Profile
// ==UserScript==
// @name 自动填分区
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 自动选b站开播分区
// @author You
// @match https://link.bilibili.com/p/center/index
// @grant none
// ==/UserScript==
@spacemeowx2
spacemeowx2 / ldn_frame.bt
Created November 11, 2020 11:21
ldn_frame.bt
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: ldn_frame
// Authors: spacemeowx2
// Version: 0.1.0
// Purpose:
// Category:
// File Mask:
// ID Bytes:
use protocol::*;
use deku::prelude::*;
use tokio::prelude::*;
use std::{io, collections::VecDeque};
const HEADER_LEN: usize = 1 + 4;
fn other<E: std::error::Error + Send + Sync + 'static>(err: E) -> io::Error {
io::Error::new(io::ErrorKind::Other, err)
}
@spacemeowx2
spacemeowx2 / clean.ps1
Created October 26, 2021 17:31
Clear all UPnP devices
$upnppath = 'HKLM:\System\CurrentControlSet\Enum\SWD\DAFUPnPProvider'
$upnpdevices = Get-ChildItem $upnppath | Get-ItemProperty -name 'FriendlyName'
foreach ($upnpdevice in $upnpdevices) {
if ($upnpdevice.'FriendlyName' -ne 'I wont be deleted') {
$name = $upnpdevice.PSChildName
echo "Deleting $name"
pnputil /remove-device "SWD\DAFUPnPProvider\$name"
}
}