Skip to content

Instantly share code, notes, and snippets.

View benms's full-sized avatar
:octocat:
Githubing...

Dmitry Ben benms

:octocat:
Githubing...
View GitHub Profile
@benms
benms / README.md
Created December 26, 2023 14:59 — forked from antfroger/README.md
Using xdebug with Windows 10, WSL2, Docker and VS Code

Configuring xdebug to work with Windows 10 (WSL2), Docker and VS Code

Configuring your dev environment to be able to use xdebug when you're working on Windows 10 (with WSL2) and Docker with VS Code can be (a bit) tricky.
This is a quick reminder of how I've done that.

Configuring the environment

  1. Install and configure xdebug in Docker

Install xdebug according to the Docker image you're using

@benms
benms / ipinfo.m
Last active August 10, 2025 13:18
# build "clang -framework Foundation ipinfo.m -o ipinfo" remove this line after pasting
#import <Foundation/Foundation.h>
static NSDictionary* fetchIPInfo(void) {
NSURL *url = [NSURL URLWithString:@"https://ipinfo.io/json"];
NSData *data = [NSData dataWithContentsOfURL:url];
if (!data) {
NSLog(@"Failed to fetch data");
return nil;
}