Skip to content

Instantly share code, notes, and snippets.

View ParticleG's full-sized avatar
🖥️
Work in H3C

Particle_G ParticleG

🖥️
Work in H3C
View GitHub Profile
#pragma once
#include <array>
#include <condition_variable>
#include <mutex>
template<size_t N>
class MultiGroupMutex {
public:
static_assert(N >= 2, "N must be greater than or equal to 2");
@ParticleG
ParticleG / firewall.bat
Last active April 15, 2024 03:27
H3C Firewall Script
@echo off
::----------------RequestAdmin----------------
::Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
::If error flag set, we do not have admin.
if "%errorlevel%" NEQ "0" (
echo "Requesting administrative privileges..."
goto RequestAdmin_UACPrompt
//
// Created by g29624 on 2022/12/7.
//
#pragma once
#include <iostream>
#include <memory>
template<typename T>
@ParticleG
ParticleG / RedisHelper.cpp
Last active December 12, 2022 11:41
Redis helper for drogon framework
//
// Created by ParticleG on 2022/2/9.
//
#include <helpers/RedisHelper.h>
#include <ranges>
#include <structures/Exceptions.h>
#include <utils/crypto.h>
#include <utils/datetime.h>