This file contains hidden or 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 bilibili清爽计划 | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-02-20 | |
// @description try to take over the world! | |
// @author wander | |
// @match https://www.bilibili.com/video/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
import click | |
import random | |
def random_choice(input): | |
line = random.choice(open(input, encoding='utf8').readlines()) | |
if line: | |
return line | |
else: |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64] | |
@="Open MINGW64 here" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\open_mingw64\command] | |
@="c:\\msys64\\msys2_shell.cmd -mingw64 -here" |
This file contains hidden or 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
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
### from http://www.laurentluce.com/posts/binary-search-tree-library-in-python/ | |
class Node(object): | |
"""Tree node: left and right child + data which can be any object | |
""" |