Skip to content

Instantly share code, notes, and snippets.

View hotpxl's full-sized avatar

Yutian Li hotpxl

View GitHub Profile
@hotpxl
hotpxl / remove_xattr.c
Last active December 27, 2022 20:28
Remove extra extended attributes
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/xattr.h>
char const* kPatterns[] = {
"com.apple.quarantine", "com.apple.lastuseddate#PS",
"com.apple.metadata:kMDItemWhereFroms",
"com.apple.metadata:_kMDItemUserTags",
"com.apple.metadata:kMDLabel_nhfihrek4vfesitn3irk5qye5q"};
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import print_function
import csv
import re
import datetime
def get_service_ids(today):
service_ids = set()
@hotpxl
hotpxl / README.md
Last active March 1, 2023 03:43
Connect Microsoft Flight Simulator on Shadow to ForeFlight

Background

ForeFlight listens to UDP traffic on port 49002 for information from flight simulators. It integrates GPS, AHRS, and traffic data, giving you a very similar experience to an ADS-B In unit.

Microsoft Flight Simulator doesn't natively support this, but fs2ff is a very easy-to-use plugin that bridges the gap. You can download an executable binary from the release page and you are ready to go.

However, I run Microsoft Flight Simulator on Shadow, and to show flight information on my local ForeFlight, I need to forward the flight data. The following steps should technically work with other cloud gaming platforms as well.

Steps

  1. On your local network's router, enable port forwarding so UDP traffic from the public interface's port 49002 can reach the local iPad.
  2. Start Microsoft Flight Simulator and fs2ff. In fs2ff, deselect Auto-detect and enter 127.0.0.1 for the IP address.