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
@ParticleG
ParticleG / gist:02d65fb91e43621593b89d2716b646f2
Created April 9, 2026 18:12
dankinstall-1775757334.log
[01:55:34.058] === DankInstall Log ===
Started: 2026-04-10T01:55:34+08:00
[01:55:41.701] base-devel already installed
[01:55:41.714] Installing system packages: dms-shell, ghostty, niri, xdg-desktop-portal-gtk, accountsservice, xwayland-satellite, matugen, dgop
[01:55:41.869] 正在解析依赖关系...
[01:55:41.874] :: 有 2 个软件包可提供 dms-shell-compositor :
[01:55:41.875] :: 软件仓库 extra
[01:55:41.875] 1) dms-shell-hyprland 2) dms-shell-niri
Device: Power Button
Kernel: /dev/input/event2
Id: host:0000:0001
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
Device: Power Button
Kernel: /dev/input/event2
Id: host:0000:0001
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap button map: n/a
Tap drag lock: n/a
@ParticleG
ParticleG / VolumeManager.cpp
Created December 11, 2024 18:49
Windows Volume Manager
#include <iostream>
#include <mmdeviceapi.h>
#include <VolumeManager.h>
using namespace std;
namespace {
IMMDevice* getDefaultIMMDevice() {
#!/bin/bash
# Short script to split videos by filesize using ffmpeg by LukeLR
if [ $# -ne 3 ]; then
echo 'Illegal number of parameters. Needs 3 parameters:'
echo 'Usage:'
echo './split-video.sh FILE SIZELIMIT "FFMPEG_ARGS'
echo
echo 'Parameters:'
echo ' - FILE: Name of the video file to split'
#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>