先使用 hydrooj backup 备份数据库。
使用 hydrooj db 命令进入 mongosh,然后执行下面的命令定义比赛删除函数:
// 定义一个删除比赛的函数,参数为 domainId(域ID)和 tid(比赛ID)| #include <iostream> | |
| #include <cpuid.h> | |
| #include <stdint.h> | |
| #if defined(_WIN32) | |
| #include <Windows.h> | |
| #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__)) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>A simple clock</title> | |
| </head> | |
| <body translate="no"> | |
| <div id="output"></div> |
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| curl -s https://github.com/renbaoshuo.keys >> ~/.ssh/authorized_keys | |
| sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config | |
| sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config | |
| echo "PubkeyAcceptedKeyTypes=+ssh-rsa" >> /etc/ssh/sshd_config | |
| systemctl restart ssh.service |
| #!/bin/bash | |
| sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config | |
| sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config | |
| systemctl restart sshd.service |
I hereby claim:
To claim this, I am signing this object:
| name: Archive Site with Wayback Machine | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 1' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest |
| # Codespaces zsh prompt theme | |
| __zsh_prompt() { | |
| local prompt_username | |
| if [ ! -z "${GITHUB_USER}" ]; then | |
| prompt_username="@${GITHUB_USER}" | |
| else | |
| prompt_username="%n" | |
| fi | |
| PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow | |
| PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd |
| #!/bin/bash | |
| if [[ "$(uname -s)" =~ "Darwin" ]] | |
| then | |
| red='' | |
| green='' | |
| yellow='' | |
| magenta='' | |
| cyan='' | |
| none='' |
| import requests | |
| import os | |
| import json | |
| import pathlib | |
| import sys | |
| proxy = "http://127.0.0.1:7890" | |
| print("\nusing proxy: " + proxy + "\n\n====================\n") | |
| proxies = {"http": proxy, "https": proxy} |