Skip to content

Instantly share code, notes, and snippets.

View hdrachmann's full-sized avatar

Henrik Drachmann hdrachmann

View GitHub Profile
@mikkelkrogsholm
mikkelkrogsholm / API_MAPPING_PLAYBOOK.md
Created October 5, 2025 14:13
Automated API Mapping Playbook

Automated API Mapping Playbook

What Is This?

A simple way to automatically discover and document any website's API by giving Claude Code a single prompt. The AI will:

  • Navigate the website and capture all network traffic
  • Analyze API endpoints, authentication, and parameters
  • Generate complete OpenAPI 3.0 specifications
  • Create code examples in multiple languages
  • Produce comprehensive documentation
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active August 9, 2025 16:42
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@sahava
sahava / allowlinker-ga.js
Last active December 29, 2023 09:11
This script reproduces Google Analytics' allowLinker plugin, resulting in a function that returns true if the linker parameter in the URL is valid and false otherwise. Uses the "old" linker plugin format. You can also pass a string as an argument to check if that string is a valid linker parameter.
var checkLinker = function(str) {
// First browser fingerprint method.
// Uses the clientId / gid string, user agent, time, and browser plugin descriptions.
var joiner = function (cidGid, offset) {
var a = new Date,
b = window.navigator,
c = b.plugins || [];
var d = [cidGid, b.userAgent, a.getTimezoneOffset(), a.getYear(), a.getDate(), a.getHours(), a.getMinutes() + offset];
for (var e = 0; e < c.length; ++e) {
@JeremyLikness
JeremyLikness / CosmosImporter.cs
Created July 20, 2018 19:16
Create a sharded MongoDB collection with the C# driver
var partition = new BsonDocument {
{"shardCollection", $"{db.DatabaseNamespace.DatabaseName}.{collectionName}"},
{"key", new BsonDocument {{"FoodGroupId", "hashed"}}}
};
var command = new BsonDocumentCommand<BsonDocument>(partition);
await db.RunCommandAsync(command);
@aluanhaddad
aluanhaddad / Example.cs
Created November 22, 2017 23:31
C# Observable HTTP
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Immutable;
using System.Linq;
using System.Net.Http;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Joins;
using System.Reactive.Linq;
@dwilkie
dwilkie / docker-cheat-sheat.md
Last active May 12, 2024 14:08
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@mitchwongho
mitchwongho / Docker
Last active August 4, 2025 15:34
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
@troyscott
troyscott / xmla4js-script.js
Created August 1, 2012 06:03
XMLA 4 JavaScript Example
var query = "select {[Measures].[Sales Amount], " +
"[Measures].[Average Sales Amount]} ON COLUMNS, " +
"[Product].[All Products].Children ON ROWS" +
" From [Sales Summary]";
var rowset = function(mdx){
xmla = new Xmla();
return xmla.execute({
async: false,
url: "http://localhost/olap/msmdpump.dll",