Skip to content

Instantly share code, notes, and snippets.

View DDoSolitary's full-sized avatar
📚
Doing homework

DDoSolitary DDoSolitary

📚
Doing homework
View GitHub Profile
@DDoSolitary
DDoSolitary / beihanglogin.nix
Created June 28, 2023 05:21
NixOS module for automatic authentication of BUAA campus network
{ config, lib, pkgs, ... }:
let beihanglogin = with pkgs; stdenv.mkDerivation rec {
pname = "beihanglogin";
version = "unstable-2022-03-11";
src = fetchFromGitHub {
owner = "buaahub";
repo = "BeihangLogin";
rev = "5aff7091e967df8c3a6648df9c6c3bc6357b051b";
sha256 = "tbQ5JRcPQlebygWbJpaFY2HKcS7j4tPrdCXa/zEvLWg=";
};
@DDoSolitary
DDoSolitary / uwu-titan-helper.xml
Last active July 11, 2022 16:17
FFXIV UWU Titan Gaol Helper
<?xml version="1.0"?>
<TriggernometryExport Version="1">
<ExportedFolder Id="314a405e-6a9d-4740-bd57-fbdff3d50c50" Name="UWU_Titan" Enabled="true">
<Folders />
<Triggers>
<Trigger Enabled="true" Sequential="True" Name="Init" Id="149e2c1c-685d-46e7-b1da-4a8a91069fb7" RegularExpression=" ChangeMap .*:475:| ChatLog .*:UWU_Init$">
<Actions>
<Action OrderNumber="1" ListVariableName="UWU_JobOrder" TextAuraFontSize="9" TextAuraFontName="宋体" ActionType="ListVariable">
<Condition Enabled="false" Grouping="Or" />
</Action>
@DDoSolitary
DDoSolitary / nfa-determinization.cpp
Created November 9, 2021 16:04
NFA determinization
#include <utility>
#include <set>
#include <vector>
#include <optional>
#include <queue>
#include <map>
#include <iostream>
#include <iterator>
int main() {
#!/usr/bin/env python3
from __future__ import annotations
import functools
import itertools
import json
import multiprocessing
import random
import re
#!/usr/bin/env python3
import argparse
import asyncio
import copy
import random
import re
from abc import ABC
from argparse import ArgumentParser
from asyncio import AbstractEventLoop, StreamReader, StreamWriter
#!/usr/bin/env python3
import functools
import json
import math
import multiprocessing
import random
import re
import subprocess
import sys
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
This is the checkstyle configuration file used for Object-Oriented class, simplified from google official code style.
Some helpful information:
Google official code style: https://google.github.io/styleguide/javaguide.html
@DDoSolitary
DDoSolitary / arknights-inf-practice.py
Created July 27, 2019 12:21
mitmproxy的明日方舟无限演习插件
import uuid
import json
from mitmproxy import http
from mitmproxy import ctx
class ArknightsPlugin:
def __init__(self):
self.started = False
def request(self, flow) -> None:
url = flow.request.pretty_url
if url.startswith("https://ak-gs.hypergryph.com:8443/"):

Keybase proof

I hereby claim:

  • I am ddosolitary on github.
  • I am ddosolitary (https://keybase.io/ddosolitary) on keybase.
  • I have a public key ASAGJ1DvvlVO0TnQg5loqq9XtopKkMQIzEi_XqzwYwSQjQo

To claim this, I am signing this object:

@DDoSolitary
DDoSolitary / hwaccel-auto-config.sh
Last active February 19, 2022 02:26
Automatically configure hardware acceleration on Arch Linux.
#!/bin/bash
unset LIBVA_DRIVER_NAME VDPAU_DRIVER DRI_PRIME
if lspci -k | grep -q -e amdgpu -e radeon; then
export LIBVA_DRIVER_NAME=radeonsi
export VDPAU_DRIVER=radeonsi
elif lspci -k | grep -q nouveau; then
export LIBVA_DRIVER_NAME=nouveau
export VDPAU_DRIVER=nouveau