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
$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" | |
} | |
} |
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
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) | |
} |
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
//------------------------------------------------ | |
//--- 010 Editor v9.0.2 Binary Template | |
// | |
// File: ldn_frame | |
// Authors: spacemeowx2 | |
// Version: 0.1.0 | |
// Purpose: | |
// Category: | |
// File Mask: | |
// ID Bytes: |
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
// ==UserScript== | |
// @name 自动填分区 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 自动选b站开播分区 | |
// @author You | |
// @match https://link.bilibili.com/p/center/index | |
// @grant none | |
// ==/UserScript== |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
function gqlPing(server, delay = 0) { | |
return new Promise((res, rej) => { | |
const ws = new WebSocket(`ws://${server}`, 'graphql-ws') | |
let timeoutId = undefined | |
let lastTime = undefined; | |
const doPing = () => { | |
ws.send(`{"id":"1","type":"start","payload":{"variables":{},"extensions":{},"operationName":null,"query":"subscription{serverInfo{online}}"}}`) | |
lastTime = Date.now() | |
} | |
ws.onmessage = (e) => { |
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
#!/usr/bin/env python3 | |
import shbus.realtime | |
line = '733路' | |
direction = True | |
stop = 0 | |
client = shbus.realtime.client() | |
response = client.getRealtimeBus(line, stop, direction=direction) | |
print(response.info.routes[0 if direction else 1].names[stop]) |
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
// ==UserScript== | |
// @name 显示B站弹幕发送时间 | |
// @namespace http://imspace.cn/ | |
// @version 0.1 | |
// @description 显示B站弹幕发送时间 | |
// @author Space | |
// @match https://live.bilibili.com/* | |
// @match http://live.bilibili.com/* | |
// @grant none | |
// ==/UserScript== |
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 groupCount = 5 | |
function sim() { | |
let score = {} | |
for (let i = 0; i < groupCount; i++) { | |
score[i] = 0 | |
} | |
for (let i = 0; i < groupCount - 1; i++) { | |
for (let j = i + 1; j < groupCount; j++) { | |
const win1 = Math.random() < 0.5 |
NewerOlder