- Ubuntu 22.04.4 LTS
- Intel AX200
其他网卡只要能驱动,大概率也行,未测试
| #include <iostream> | |
| #include <fstream> | |
| #include <sstream> | |
| #include <string> | |
| #include <map> | |
| #include <memory> | |
| #include <vector> | |
| #include <cstdlib> | |
| #include <curl/curl.h> | |
| #ifdef _WIN32 |
| #include <Uefi.h> | |
| #include <Library/UefiBootServicesTableLib.h> | |
| #include <Library/UefiRuntimeServicesTableLib.h> | |
| #include <Library/UefiLib.h> | |
| #include <Library/MemoryAllocationLib.h> | |
| #include <Protocol/SimpleFileSystem.h> | |
| #include <Protocol/LoadFile.h> | |
| #include <Guid/FileInfo.h> | |
| #include <Library/BaseLib.h> | |
| #include <Library/PrintLib.h> |
| # | |
| # Copyright (C) 2009-2024 OpenWrt.org | |
| # | |
| # This is free software, licensed under the GNU General Public License v2. | |
| # See /LICENSE for more information. | |
| # | |
| include $(TOPDIR)/rules.mk | |
| PKG_NAME:=mdk4 |
| #!/bin/bash | |
| for file in *.rar; do | |
| if [ -f "$file" ]; then | |
| oldname=$(echo -n "$file" | grep -oP '.*(?=[.])') | |
| newname=$(rar lb "$file" | head -1 | sed 's/\/.*//') | |
| newname="[EAC]${newname}[$oldname](wav+cue+log+png)" | |
| if [ -n "$newname" ]; then | |
| mv -i "$file" "$newname.rar" | |
| echo "Renamed $file to $newname.rar" | |
| fi |
| #!/usr/bin/python3 | |
| import argparse | |
| import os | |
| import subprocess | |
| def main(): | |
| parser = argparse.ArgumentParser(description='Split flac file using cue') | |
| parser.add_argument('cue', type=str, help='path to cue file') |
| # 解压所有rar | |
| find . -name \*.rar -print0 | xargs -0 -I {} ~/unrar x '{}' -pPass output/ | |
| # 转换所有wav到flac 输出到同名文件 | |
| find . -name \*.wav | grep -oP '.*(?=[.])' | xargs -d '\n' -I {} ~/ffmpeg -threads 1 -i '{}.wav' -c:a flac -compression_level 8 -fflags +bitexact '{}.flac' | |
| # 修改所有cue中的引用文件名 | |
| find . -name \*.cue | xargs -d '\n' -I {} sed -i -re 's/(FILE\s+")+(.*)(\.\w+)("\s+WAVE)/\1\2.flac\4/Ig' '{}' | |
| #发布前署名mora flac | |
| mkdir conv | |
| gfind . -name \*.flac -print0 | gxargs -P 4 -0 -I {} sh -c "gsed 's/\x72\x65\x66\x65\x72\x65\x6E\x63\x65\x20\x6C\x69\x62\x46\x4C\x41\x43\x20\x31\x2E\x33\x2E\x31\x20\x32\x30\x31\x34\x31\x31\x32\x35/\x42\x6F\x75\x67\x68\x74\x20\x62\x79\x20\xE8\x9A\x82\xE8\x9A\x81\xE6\xAF\x94\xE8\xB1\xA1\xE5\xA4\xA7\x40\x54\x53\x44\x4D\x5E\x5E/g' '{}' > 'conv/{}'" |
| #!/usr/env python3 | |
| ######################################################################## | |
| # | |
| # Simple HTTP server that supports file upload for moving data around | |
| # between boxen on HTB. Based on a gist by bones7456, but mangled by me | |
| # as I've tried (badly) to port it to Python 3, code golf it, and make | |
| # It a little more robust. I was also able to strip out a lot of the | |
| # code trivially because Python3 SimpleHTTPServer is a thing, and the | |
| # cgi module handles multipart data nicely. | |
| # |
| /* $OpenBSD: getopt_long.c,v 1.21 2006/09/22 17:22:05 millert Exp $ */ | |
| /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ | |
| /* | |
| * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> | |
| * | |
| * Permission to use, copy, modify, and distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. | |
| * |
| // 字符串反转 "You are so pretty." -> "pretty. so are you" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| void strreverse(char *str,size_t nLength){ | |
| if(!str) return; | |
| for(size_t i=0;i<nLength/2;++i){ | |
| if(str[i]==str[nLength-i-1]) continue; | |
| str[i]=str[nLength-i-1] ^ str[i]; |