Skip to content

Instantly share code, notes, and snippets.

View xchehub's full-sized avatar
:octocat:

XC xchehub

:octocat:
View GitHub Profile
@kenming
kenming / AGENTS.md
Created January 28, 2026 03:36
VS Code Copilot & Claude Code: Relationship Between AGENTS.md, copilot-instructions, and CLAUDE.md

AGENTS.md(Agent 協作規範)

本文件定義了 AI Agent 在本專案中協作時的行為邊界,確保開發流程的可預測性。

1. 核心開發流程:先計畫、後實作

  • 思考優先:涉及跨檔案或架構變更時,必須先產出「修改計畫」供開發者審核。
  • 最小變動:以「可演示、可驗證」為目標。避免不必要的大規模重構。
  • 透明假設:若環境資訊不明,必須列出你的假設點,而非自行通靈。

2. 產出交付格式

name description tools model
appsec-guardian
Expert Application Security Engineer. Prevents insecure code from reaching remote repositories by enforcing OWASP Top 10 and secure SDLC practices. Runs before git push to block vulnerable code.
view, bash_tool, str_replace, create_file, web_search, web_fetch
inherit

You are a senior Application Security Engineer with deep expertise in OWASP Top 10, secure SDLC, and security-by-design principles.

Core Mission

@jserv
jserv / main.c
Created November 17, 2024 18:53
Object-Oriented Programming (OOP) in C: Render pixel effects using SDL2
/*
* This program demonstrates a simple Object-Oriented Programming (OOP)
* approach in C using function pointers and structures. It renders pixel
* effects onto an RGBA32 buffer using SDL2 for window management and display.
*
* Supported effects:
* - Bitwise operations pattern
* - Mandelbrot fractal visualization
*
* Key controls:
Two pointers: one input, opposite ends
```python3
def fn(arr):
left = ans = 0
right = len(arr) - 1
while left < right:
# do some logic here with left and right
if CONDITION:
@JorgeAtPaladin
JorgeAtPaladin / ERC721Staking.sol
Created April 15, 2022 00:21
ERC721Staking.sol
// SPDX-License-Identifier: MIT // OK
// Creator: andreitoma8 // OK
pragma solidity ^0.8.4; // OK
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // OK
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // OK
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // OK
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; // OK
import "@openzeppelin/contracts/access/Ownable.sol"; // OK
@dabit3
dabit3 / marketplace.sol
Last active April 29, 2025 06:06
NFT Marketplace Smart Contract (V2)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
contract NFTMarketplace is ERC721URIStorage {
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active October 4, 2025 08:06
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
Connect & Disconnect
---
import json
def lambda_handler(event, context):
print(event)
print("****")
print(context)
@pahud
pahud / bootstrap.sh
Last active September 27, 2024 14:27
AWS SSO + Codespaces
#!/bin/bash
# video demo - https://www.youtube.com/watch?v=Y8TyE_DNds8
mkdir ~/.tmp && cd $_
# install aws-cli v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
sudo ./aws/install