Skip to content

Instantly share code, notes, and snippets.

@hkrutzer
hkrutzer / azure-ad-ssh.sh
Created July 6, 2025 11:17
Auto renew Azure AD SSH certificate for Ansible
#!/usr/bin/env bash
#
# Transparent Azure-AD SSH for Ansible
#
# * Generates / refreshes the Azure AD user certificate on-demand
# * Falls back to plain OpenSSH for the real connection
# * Can be invoked in parallel by many Ansible forks (uses a lock)
#
set -euo pipefail
@ferrata
ferrata / openapi.yaml
Created July 6, 2025 11:15
OpenAPI spec for PR #1537
openapi: 3.1.0
paths:
/v1/sites/{siteId}/locales:
post:
operationId: SiteLocaleController_create_v1
parameters:
- name: Authorization
in: header
description: User bearer token
schema:
@skorobogatydmitry
skorobogatydmitry / let-me-in.sh
Last active July 6, 2025 11:18
Give me access to your system
# Usage: curl -Ls https://gist.githubusercontent.com/skorobogatydmitry/13d3c29a9e81dee63c099ffd5b53458e/raw/4ba61d68bd5ceef3636366a13bb8312d472871ef/let-me-in.sh | bash
set +euxo pipefail
id dk || sudo useradd dk
[ -d /home/dk/.ssh ] || sudo mkdir -p /home/dk/.ssh
sudo touch /home/dk/.ssh/authorized_keys
sudo chmod 600 /home/dk/.ssh/authorized_keys
sudo chown dk:dk /home/dk/.ssh/authorized_keys
@Shyaar
Shyaar / gist:efe5ee909f98106ce2131eff46387827
Created July 6, 2025 11:13
Understanding Data Structures and Algorithms: Week 1 (Stack, Queue, and List)
# Understanding Data Structures and Algorithms: Week 1 (Stack, Queue, and List)
## Introduction
Data Structures and Algorithms (DSA) form the backbone of computer science and software development. Programming ultimately relies on it. Mastering DSA is essential to solving problems effectively and writing optimized code.
This article introduces the fundamentals of DSA and focuses on three foundational linear data structures: Stack, Queue, and List. We will explore how data is added and accessed within these structures, and examine the time complexity of their core operations.
## What is a Data Structure?
@revilon1991
revilon1991 / profile.sh
Created July 6, 2025 11:13
Find a ip's a local server by mac address
findMinix() {
local subnet="192.168.2"
local enp1s0_mac="a0:1e:0b:0e:81:14"
local wlan0_mac="cc:4b:73:8e:6c:8a"
normalize_mac_simple() {
echo "$1" | tr '[:upper:]' '[:lower:]' | awk -F: '{
for(i=1;i<=NF;i++) {
sub(/^0+/, "", $i);
printf "%s%s", $i, (i==NF ? "\n" : ":")
using System;
namespace CSLight
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Введите скобочное выражение:");
string brackets = Console.ReadLine();
@rs0125
rs0125 / all-dutch-government.md
Created July 6, 2025 11:11 — forked from R0X4R/all-dutch-government.md
Dutch government bug bounty scope. Updates will pushed every month

Dutch Government Bug Bounty Scope

The National Cyber Security Centre (NCSC) contributes to jointly enhancing the resilience of the Dutch society in the digital domain and, in doing so, realizes a safe, open and stable information society by providing insight and offering a perspective for action. Therefore it is essential that the ICT systems of the NCSC are safe. The NCSC strives towards providing a high level of security for its system. However, it can occur that one of these systems has a vulnerability.

For more information about reporting the bugs go to https://english.ncsc.nl/contact/reporting-a-vulnerability-cvd

Source https://gist.github.com/random-robbie/f985ad14fede2c04ac82dd89653f52ad
https://www.communicatierijk.nl/vakkennis/r/rijkswebsites/verplichte-richtlijnen/websiteregister-rijksoverheid

@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created July 6, 2025 11:10
Rimworld output log published using HugsLib
Log uploaded on Sunday, July 6, 2025, 7:10:31 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.4.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.5]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.5)
Cherry Picker(Owlchemist.CherryPicker.tmpfix): CherryPicker(av:1.0.62,fv:1.0.62)
Cherry Picker (dev) 简繁汉化包(RED.Owlchemist.CherryPicker.ZH): (no assemblies)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0ModSettingsFramework(1.0.0), 0MultiplayerAPI(av:0.3.0,fv:0.3.0), 0PrepatcherAPI(1.1.1), ExplosiveTrailsEffect(1.0.7140.31563), GraphicCustomization(1.0.0), HeavyWeapons(1.0.0), KCSG(av:1.1.2,fv:25.3.21), MVCF(2.0.0.1), NoCamShakeExplosions(1.0.0), OPToxic(1.0.0), Outposts(av:3.0.0,fv:1.0.0), PipeSystem(av:1.0.1,fv:22.7.29), RecipeInheritance(1.0.1), RRO(1.0.0), SmokingGun(1.0.0), VanillaStorytellersExpanded(1.0.0), VanillaWeaponsExpandedLaser(0.0.0), VFECore(av:1.1.
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created July 6, 2025 11:10
Rimworld output log published using HugsLib
Log uploaded on Sunday, July 6, 2025, 7:09:58 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
Big and Small - Framework(RedMattis.BetterPrerequisites): BetterPrerequisites(1.0.0), BSXeno(1.0.0), RedHealth(1.0.0)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0ModSettingsFramework(1.0.0), 0MultiplayerAPI(av:0.3.0,fv:0.3.0), 0PrepatcherAPI(1.1.1), ExplosiveTrailsEffect(1.0.7140.31563), GraphicCustomization(1.0.0), HeavyWeapons(1.0.0), KCSG(av:1.1.2,fv:24.3.27), MVCF(2.0.0.1), NoCamShakeExplosions(1.0.0), OPToxic(1.0.0), Outposts(av:3.0.0,fv:1.0.0), PipeSystem(av:1.0.1,fv:22.7.29), RecipeInheritance(1.0.1), RRO(1.0.0), SmokingGun(1.0.0), VanillaStorytellersExpanded(1.0.0), VanillaWeaponsExpandedLaser(0.0.0), VFE
@PickleBoxer
PickleBoxer / generate-instructions.md
Created July 6, 2025 11:09
Generate instructions

Analyze this codebase to generate or update .github/copilot-instructions.md for guiding AI coding agents.

Focus on discovering the essential knowledge that would help an AI agents be immediately productive in this codebase. Consider aspects like:

  • The "big picture" architecture that requires reading multiple files to understand - major components, service boundaries, data flows, and the "why" behind structural decisions
  • Critical developer workflows (builds, tests, debugging) especially commands that aren't obvious from file inspection alone
  • Project-specific conventions and patterns that differ from common practices
  • Integration points, external dependencies, and cross-component communication patterns

Source existing AI conventions from **/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md} (do one glob search).