Skip to content

Instantly share code, notes, and snippets.

View QuiltMeow's full-sized avatar
🐈
喵嗚 :3 ~

棉被 QuiltMeow

🐈
喵嗚 :3 ~
View GitHub Profile
@echo off
title KMS Office 2019
>nul 2>&1 "%SystemRoot%\system32\cacls.exe" "%SystemRoot%\system32\config\system"
if "%ErrorLevel%" NEQ "0" (
echo 嘗試取得系統管理員權限 ...
goto UACPrompt
) else (
goto getAdmin
@echo off
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
@QuiltMeow
QuiltMeow / PFXConvert.bat
Last active February 3, 2024 12:13
PFX To CRT And KEY
@echo off
set OPEN_SSL="C:\Program Files\OpenSSL-Win64\bin\openssl.exe"
set /P FILE=Input PFX Key File Name :
rem Extract Encrypt Private Key
%OPEN_SSL% pkcs12 -in %FILE% -nocerts -out encrypt.key
rem Extract Public Key
%OPEN_SSL% pkcs12 -in %FILE% -clcerts -nokeys -out certificate.crt
@QuiltMeow
QuiltMeow / apk.tw-check-in.js
Last active January 26, 2023 21:06
使用者腳本
// ==UserScript==
// @name APK.TW 自動簽到
// @namespace https://www.quilt.idv.tw/
// @version 0.1
// @description APK.TW 自動簽到
// @author 棉被
// @match https://apk.tw/*
// ==/UserScript==
let element = document.getElementById("my_amupper");
@QuiltMeow
QuiltMeow / PourWaterProblem.cpp
Created January 26, 2023 20:34
倒水問題
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// 建立水桶結構體,每個水桶有他的容量和初始水量
typedef struct {
int capacity;
int start;
@QuiltMeow
QuiltMeow / StarPrintHelper.h
Last active December 25, 2022 13:40
M、N Star Print Practice
#include <iostream>
class StarPrintHelper {
private:
static bool shouldPrintStar(int current, int line, int direction, int j) {
for (int i = 1; i <= direction; ++i) {
if (i % 2 == 0) {
if (j == line * i - current - i + 2) {
return true;
}
using System;
using System.Collections.Generic;
using System.IO;
namespace Stat
{
public static class Program
{
private const string FILE_NAME = "Data.txt";
private static readonly IDictionary<string, int> stat = new Dictionary<string, int>();
@QuiltMeow
QuiltMeow / install-pulseaudio-module-xrdp.sh
Created September 26, 2022 20:05
Pulse Audio Module XRDP 安裝腳本
#!/bin/bash
# 請以 Root 使用者執行 (sudo su -)
apt-get update
apt-get dist-upgrade -y
apt-get install xrdp build-essential git autoconf libtool pkg-config libpulse-dev -y
adduser xrdp ssl-cert
systemctl restart xrdp
cd /root
using System.Runtime.InteropServices;
namespace ClockResolution
{
public struct TimerResolution
{
public double periodMin;
public double periodMax;
public double periodCurrent;
}
@QuiltMeow
QuiltMeow / empty.php
Last active June 29, 2022 17:22
網路速度測試 簡化版本 (4 檔案)
<?php
header("HTTP/1.1 200 OK");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Connection: keep-alive");
?>