Skip to content

Instantly share code, notes, and snippets.

View scc-tw's full-sized avatar
🏠
Working from home

SCC scc-tw

🏠
Working from home
View GitHub Profile
@scc-tw
scc-tw / Makefile
Created May 6, 2022 09:12
Universal pdflatex Makefile
src=$(wildcard *.tex)
target=$(patsubst %.tex,%.pdf,$(src))
middles=$(shell pwd)/build
.PHONY:mkdir all clean deepclean
%.pdf: %.tex mkdir
pdflatex -no-shell-escape -output-directory="$(middles)" $<
pdflatex -no-shell-escape -output-directory="$(middles)" $<
all: $(target)
@scc-tw
scc-tw / enable_if98.cpp
Created September 20, 2023 09:34
concepts_in_C++98
#include <iostream>
#include "type_traits.hpp"
template <typename T, typename U>
struct is_addable
{
static const bool
value =
is_arithmetic<T>::value && is_arithmetic<U>::value;
};
@scc-tw
scc-tw / banchmark.py
Created February 4, 2024 13:00
perfect-forwarding-is-faster-than-c-pointer
import subprocess
import re
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
import json
import datetime
import os
@scc-tw
scc-tw / main.cpp
Created May 21, 2024 19:35
Efficient Resource Management and Evaluation of Large-scale Node Processing in C++
#include <iostream>
#include <memory>
#include <vector>
#include <string>
#include <stdexcept>
#include <stack>
#include <chrono>
// Resource pool for data locality
constexpr auto file_max_number = 20'000'000;
@scc-tw
scc-tw / NoThrowAllocator.hpp
Created July 14, 2024 19:00
NoThrowAllocator in C++: A standard-compliant, exception-free memory allocator for high reliability applications.
#ifndef SCC_NOTHROW_ALLOCATOR
#define SCC_NOTHROW_ALLOCATOR
#pragma once
#include <memory>
#include <limits>
#include <new>
namespace scc {
@scc-tw
scc-tw / ad_schema_attributes.json
Created April 10, 2025 04:07
Active Directory Schema Attributes Collection A comprehensive collection of Active Directory schema attributes extracted from Microsoft's official documentation. Contains detailed specifications for 1420+ AD attributes including their LDAP names, sizes, syntax, and identifiers. Each attribute entry contains: - CN: Common Name (e.g. "ACS-Aggregat…
[
{
"CN": "ACS-Aggregate-Token-Rate-Per-User",
"Ldap-Display-Name": "aCSAggregateTokenRatePerUser",
"Size": 8,
"Update Privilege": "",
"Update Frequency": "",
"Attribute-Id": "1.2.840.113556.1.4.760",
"System-Id-Guid": "7f56127d-5301-11d1-a9c5-0000f80367c1",
"Syntax": "**Interval**",